PersistOnClose: Enforce Workflow (WF) persistence

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

Sometimes you may expect that some parts of the workflow takes long time for execution. This is in workflow context mostly common requirement. Unfortunately longer execution statistically increases the error probability in the workflow itself. To solve this problem I would personally design th workflow to be executed internally step-by-step with ability to persist the state after each step.

To do this as easy as possible it is necessary to explicitly trigger persistence of the execution step. To satisfy this requirement, I build the activity which is persisted each time after its execution. This activity would not implement any logic. I would act just like kind of persistence-scope as shown at the next picture:

image

By using of this activity the workflow will be automatically persisted after executing of operation DoSomething. Implementation of the PersistanceScope-activity is as simple as shown below. All it has to be done is to append the attribute [PersistOnClose].

image

[Workflow Foundation]
[http://www.daenet.de]


Posted Mar 05 2008, 04:42 PM by Damir Dobric
Filed under: ,
developers.de is a .Net Community Blog powered by daenet GmbH.