views:

292

answers:

2

When does a windows workflow process go 'idle'?

Does it wait a certain amount of time? (can this time be changed?)

Or does it go idle immediately when an activity is blocking/listening?

A: 

A workflow goes idle when it is waiting for some external trigger/event

This is an issue I have at present, as I am having a problem with a Sharepoint WF workflow idling when I try to run it in a WorkflowRuntime based test harness. I assume it is waiting for some trigger to activate it that would normally be provided by SharePoint.

Does anyone have any idea how I could work out that this trigger is?

Richard Fennell
+1  A: 

A workflow instance idles when:

  • it is waiting for an external event (ReceiveActivity / WCF or ListenActivity / ExternaDataExchange)
  • a DelayActivity is executing

Further the workflow instance gets persisted when:

  • it is in the idle state (see above)
  • it is completed or terminated
  • a TransactionScopeActivity or a CompensatableTransactionScopeActivity completes
  • the execution of a custom activity marked with the PersistOnClose attribute completes
  • Unload() (or TryUnload) gets called on it
kay.herzam