This project is read-only.
1
Vote

Implement synchronous workflow execution using the WorkflowApplication

description

The WorkflowApplication is a great way to execute your workflows in process. Usually the fact that the WorkflowApplication is asynchronous is a great thing but there are cases when a little more synchronous execution is nice. For example executing a workflow and updating the state of the user interface is much simpler when the WorkflowApplication.Run() doesn’t finish until all work is done.

The key to creating a synchronous WorkflowApplication is using its SynchronizationContext. Normally you set this to SynchronizationContext.Current so everything executes on the current UI thread. However this is still an asynchronous call and the Run doesn’t block.

http://msmvps.com/blogs/theproblemsolver/archive/2011/01/07/doing-synchronous-workflow-execution-using-the-workflowapplication.aspx?ocid=aff-n-we-loc--DEV40909&WT.mc_id=aff-n-we-loc--DEV40909

comments