You are viewing limited content. For full access, please sign in.

Question

Question

How to Debug a Workflow Issue

asked on August 5, 2016

Hi everyone,

I'm primarily looking for advice on how to debug an issue. However, if you have seen tis happen before, feel free to post a solution, too!
 

I have a workflow, triggered by REST call, which fails at the third activity. The activity is "Search Repository." The problem is not a fail, per se, rather the activity has been stuck on "running" for a couple of hours. Normally this activity completes very quickly. I'm looking at the issue in the test environment so the repository is very small.

If I run the search criteria from the Laserfiche client, it completes in under a second.

The usual claim (and proof via the logs) of "this worked before" applies. I'm waiting on another test to see if it works today.

Workflow did produce an error log but I can't glean anything from it (see below).

I looked through the activity, error, subscriber, database and communications logs but only found a corresponding entry in the activity log.

There's a Workflow Service entry, which corresponds time-wise, in the Windows event log. (see below as well). The database is functional enough to execute workflows and to allow me to publish new definitions.

I don't appear to have tracing enabled.

My workflow version is 9.2.0.167

Any ideas where to look next? Turning on tracing and hope it happens again?

 

Activity Log

Timestamp: 2016-08-05 07:34:31.085

Local Time: 05/08/2016 08:34:31

Category: Activity

Machine: xxxxxxx

Severity: Error

Application Domain: Laserfiche.Workflow.Service.exe

Process Id: 3012

Process Name: D:\Program Files\Laserfiche\Laserfiche Workflow 9\Laserfiche.Workflow.Service.exe

Win32 Thread Id: 4484 - Task Work Thread [GeneralTasks]

Thread Name: Task Work Thread [GeneralTasks]

Message: <Exception handlingInstanceId="xxxxxxxx-eacf-4f05-bd09-c78c022dc022">
  <Description>An exception of type 'System.InvalidOperationException' occurred and was caught.</Description>
  <DateTime>2016-08-05 08:34:31Z</DateTime>
  <ExceptionType>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
  <Message>Workflow with id "xxxxxxxxx-ab3d-4ece-af9e-77abf874933c" not found in state persistence store.</Message>
  <Source>System.Workflow.Runtime</Source>
  <HelpLink />
  <Property name="InstanceId">xxxxxxxx-ab3d-4ece-af9e-77abf874933c</Property>
  <Property name="ActivityName">ValidatetheOrderRequest</Property>
  <Property name="TargetSite">System.Workflow.ComponentModel.Activity InitializeExecutor(System.Guid, System.Workflow.Runtime.CreationContext, System.Workflow.Runtime.WorkflowExecutor, System.Workflow.Runtime.WorkflowInstance)</Property>
  <Property name="HResult">-2146233079</Property>
  <StackTrace>   at System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId, CreationContext context, WorkflowExecutor executor, WorkflowInstance workflowInstance)
   at System.Workflow.Runtime.WorkflowRuntime.Load(Guid key, CreationContext context, WorkflowInstance workflowInstance)
   at System.Workflow.Runtime.WorkflowRuntime.GetWorkflow(Guid instanceId)
   at Laserfiche.Workflow.Runtime.WorkflowManager.GetWorkflowInstance(Int32 workflowId, Guid workflowInstanceId, Boolean refreshInstanceCache)
   at Laserfiche.Workflow.Runtime.WorkflowManager.Laserfiche.Workflow.Runtime.IWorkflowRuntimeHost.GetWorkflowInstance(Int32 workflowId, Guid instanceId)
   at Laserfiche.Workflow.ServerApplication.GetWorkflowInstance(Int32 workflowId, Guid instanceId)
   at Laserfiche.Workflow.Runtime.Systems.Tasks.TaskDatabaseRuntime.NotifyWorkflowInstance(Task task, IResult result, WorkItemFinishedEventArgs args)</StackTrace>
  <additionalInfo>
    <info name="MachineName" value="xxxxxxx" />
    <info name="TimeStamp" value="05/08/2016 07:34:31" />
    <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="xxxxxxxxxx\xxxxxxxxxx" />
  </additionalInfo>
</Exception>
----------------------------------------

 

Event Log Snip-it

Message: <Exception handlingInstanceId="xxxxxx9-f476-491e-bafb-117de14e14c7">
  <Description>An exception of type 'Oracle.DataAccess.Client.OracleException' occurred and was caught.</Description>
  <DateTime>2016-08-05 08:34:29Z</DateTime>
  <ExceptionType>Oracle.DataAccess.Client.OracleException, Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=xxxxxxxxc47342</ExceptionType>
  <Message>ORA-01400: cannot insert NULL into ("LFWORKFLOW"."INDEX_RULE_NAME"."RULE_NAME")
ORA-06512: at "LFWORKFLOW.GET_OR_CREATE_RULE_NAME_ID", line 1
ORA-01403: no data found
ORA-06512: at "LFWORKFLOW.UPDATE_WORKFLOW_INFORMATION", line 1
ORA-06512: at line

 

 

 

0 0

Answer

SELECTED ANSWER
replied on August 15, 2016

Yeah, pretty much. I'm not sure why rebooting the repository server would cause the first issue unless that's also your SQL server.

0 0

Replies

replied on August 5, 2016

Restarting the Workflow and Subscriber services resolved the problem. I'm still interested in any further investigation options.

-Ben

 

0 0
replied on August 5, 2016

Had the same issue the other day. Occurred within the same time frame as deleting the workflows most current version. Restarting the services caused it to proceed and everything worked again.

 

-Carl

0 0
replied on August 5, 2016

The second stack trace says that the rule name was null and that generated an error. If you're setting it dynamically, maybe that failed in some way?

The first one looks like Workflow failed to save the instance in the database, which is why it's currently stuck running. Usually this can occur when the database server is unresponsive for whatever reason. It's unlikely it was related to the other error because the instance wouldn't have gotten this far (it would've died on the root activity).

0 0
replied on August 15, 2016

Hi Miruna,

I think the short answer is that I was looking in all the right places for the logs and debug information?

Rebooting the workflow server solved the problem. The problem was cause by rebooting the repository server. I suspect retsarting the workflow services would have worked too.

Thanks for your reply. As I said above, I was checking to see if I had looked in all the right places for logs to debug the problem, rather than looking for a resolution itself.

Can I infer from your reply that I had looked in all the right places?

-Ben

 

0 0
SELECTED ANSWER
replied on August 15, 2016

Yeah, pretty much. I'm not sure why rebooting the repository server would cause the first issue unless that's also your SQL server.

0 0
replied on August 15, 2016

Thanks. The database runs on an non-Windows Oracle installation, somewhere in in the ecosystem.

0 0
replied on August 15, 2016

There might be errors in Workflow's database log that could shed more light into why the instance wasn't saved properly.

1 0
replied on January 24

Found this thread by using error found in event-viewer "Could not find workflow instance 'xxxxx' in the persistence store. ".

But my issue is even worse -- after a workflow run wild and freeze the whole wf designer. Then all of a sudden my "LFWFServer" service fully stopped. I restart both the service and subscriber service,  after 10 seconds or so the "LFWFServer" service stops again.

I tried re-install whole Workflow components, still the same.

After some fumble around workflow DB,  and notice the 2 table "workflow_task_queue/workflow_task_queue_data" holds something related to the last run of my workflow. Delete data from both table. Then start the "LFWFServer" service, and it keeps "running" ever since.

Hope that will eventually solve the issue but I have no clue why a task could affect the whole service.

I am on WF 11 btw.

 

 

0 0
replied on January 24

Please open a case with Tech Support and they'll help you clean up if needed. We do not recommend deleting data from the database. Doing so without the express direction of Tech Support will render your installation unsupported.

0 0
replied on January 24

Thanks for the instruction. Since it's a dev environment solely used by myself.
For any production site of a customer, I will definitely looking for support from your experts. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.