I have a workflow with and SDK script.
FolderInfo fiCreated = Folder.GetFolderInfo(BoundEntryInfo.Id, RASession); fiCreated.Lock(LockType.Exclusive); fiCreated.Unlock();
It never gets to line 3 as the lock fails.
A few bits of troubleshooting
- The workflow is just this. It's been stripped down to avoid side effects
- Error happens if triggered by a rule or started manually
- It only happens on my test server
- If I copy the flow to my production workflow server it will run even against the test laserfiche server
- If I run from the test workflow server against production laserfiche server it will fail.
- Both servers have workflow service running as local system
- Switching to network service does not help
- Switching to a domain account resolves the issue but I'm still concerned about it running as a privileged account as production does not need to.
- The full script updates the entity fields and changes it's template with no problem it's just this lock.
- We think it worked in the past but I can't be sure as it's a lightly used test system.
The error we get is "Received bad response from the server."
"C:\Program Files\Laserfiche\Workflow\Logs\Errors\activity errors.log"
---------------------------------------- Timestamp: 2024-01-24 01:27:06.609 Local Time: 2024-01-23 5:27:06 PM Category: Activity Machine: LF-WF-T Severity: Error Application Domain: Laserfiche.Workflow.Service.exe Process Id: 8796 Process Name: C:\Program Files\Laserfiche\Workflow\Laserfiche.Workflow.Service.exe Win32 Thread Id: 2180 - Task Work Thread [CustomTasks] Thread Name: Task Work Thread [CustomTasks] Message: <Exception handlingInstanceId="32fe51ac-e4cb-47da-81e6-f14794398e81"> <Description>An exception of type 'Laserfiche.WrappedException' occurred and was caught.</Description> <DateTime>2024-01-23 17:27:06Z</DateTime> <ExceptionType>Laserfiche.WrappedException, Laserfiche.Base, Version=9.0.0.0, Culture=neutral, PublicKeyToken=607dd73ee2bd1c00</ExceptionType> <Message>Received bad response from the server.</Message> <Source /> <HelpLink /> <Property name="WrappedExceptionType">Laserfiche.RepositoryAccess.MalformedDataException, Laserfiche.RepositoryAccess, Version=10.2.0.0, Culture=neutral, PublicKeyToken=3f98b3eaee6c16a6</Property> <Property name="ActivityName">SDKScript</Property> <Property name="TargetSite"><undefined value></Property> <Property name="HResult">-2146233088</Property> <StackTrace> at Laserfiche.RepositoryAccess.EntryLock.ParseLockResponse(HttpResponse response) at Laserfiche.RepositoryAccess.EntryLock.LockInternal(HttpUrl url, LockType type, Dictionary`2 additionalHeaders, String etag) at Laserfiche.RepositoryAccess.EntryLock.Lock(LockType type) at Laserfiche.RepositoryAccess.EntryInfo.Lock(LockType type) at WorkflowActivity.Scripting.SDKScript.Script1.Execute() at WorkflowActivity.Scripting.ScriptBase.ExecuteScript(ScriptExecutionContext context)</StackTrace> <additionalInfo> <info name="MachineName" value="LF-WF-T" /> <info name="TimeStamp" value="2024-01-24 1:27:06 AM" /> <info name="FullName" value="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <info name="AppDomainName" value="Laserfiche.Workflow.Service.exe" /> <info name="ThreadIdentity" value="" /> <info name="WindowsIdentity" value="NT AUTHORITY\SYSTEM" /> </additionalInfo> </Exception> ----------------------------------------