Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 30

Sql-Persistence Services

Sequence
• The OnWorkflowIdled event is invoked when a workflow
goes into an idle state, such as when executing the Delay
activity. For thread safety, you need to queue the events
raised back from a workflow on the ThreadPool class.

• The next event handler is the OnWorkFlowPersisted


event.

• This event handler is invoked when the workflow is


persisted. It implicitly calls the SaveWorkflowInstanceState
method of the SqlPersistenceService class to save the
workflow instance.

• Once the workflow instance is persisted, the


OnWorkflowUnloaded event is fired:
Sequence
• This event is invoked when the workflow is unloaded from
memory. This is performed by the UnloadInstance()
method, which was referenced earlier in the
OnWorkflowIdled event. The main purpose of the
UnloadInstance() method is to perform the unloading of
workflow instance.

• When a workflow instance is to be resumed, it must be


loaded back into memory. This is performed by the
OnWorkflowLoaded event. It implicitly calls the
LoadWorkflowInstanceState method of the
SqlPersistenceService class to load the saved workflow
instance into memory:
The end

You might also like