locked
ExecutionStatus in InstancesTable incorrect RRS feed

  • Question

  • I have an example where I invoke a workflow service operation that throws an (unhandled) exception. The operation consists of a Receive/SendReply (that captures the details of the request) followed by another activity that processes the request.

    I am logging WorkflowInstanceRecords and they are as follows:

     { InstanceState: Started, WorkflowName: MyWorkflow, InstanceId: d33ce9b6-7f8b-4a84-bee4-3996e635c0e5 }
     { InstanceState: Idle, WorkflowName: MyWorkflow, InstanceId: d33ce9b6-7f8b-4a84-bee4-3996e635c0e5 }
     { InstanceState: Persisted, WorkflowName: MyWorkflow, InstanceId: d33ce9b6-7f8b-4a84-bee4-3996e635c0e5 }
     { InstanceState: UnhandledException, WorkflowName: MyWorkflow, InstanceId: d33ce9b6-7f8b-4a84-bee4-3996e635c0e5 }
     { InstanceState: Suspended, WorkflowName: MyWorkflow, InstanceId: d33ce9b6-7f8b-4a84-bee4-3996e635c0e5 }
     { InstanceState: Aborted, WorkflowName: MyWorkflow, InstanceId: d33ce9b6-7f8b-4a84-bee4-3996e635c0e5 }

    These records are exactly what I would expect given the unhandled exception. However, the InstancesTable record seems inconsistent. It has: IsSuspended=1, ExecutionStatus="Executing"

    Shouldn't the ExecutionStatus be 'Aborted" in this case?

    I am using .NET 4.5 with the standard SqlWorkflowInstanceStore.

    Wednesday, August 13, 2014 2:32 PM

All replies

  • I should add that it also has: IsReadyToRun=1. I might be mistaken, but I thought once suspended it had to be explicitly resumed so would expect IsReadyToRun=0 in this case.
    Wednesday, August 13, 2014 2:33 PM
  • These records are exactly what I would expect given the unhandled exception. However, the InstancesTable record seems inconsistent. It has: IsSuspended=1, ExecutionStatus="Executing"

    Hi Mark,

    To investigate why this happens, you can enable WF tracing:

    http://msdn.microsoft.com/en-us/library/ee518966(v=vs.110).aspx

    Please let me know if there is anything that I can do to help.

    Best regards

    Angie



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 15, 2014 3:19 AM