Loading a persisted workflow from the database
Developing long-running applications is one goal of WF4, and resuming a persisted workflow from the database is the key to long-running applications. In this task, we will create a Sequence workflow with a Delay activity. The workflow will be persisted when it is idle. We then press the Enter key and then the workflow will be resumed and will run until its end.
Getting ready
The SQL workflow instance store needs to be already in use. We can refer the Configuring the SQL persistence store section of this chapter.
How to do it...
- Create a workflow project:
Create a new Workflow Console Application under solution
Chapter06
and name the project asLoadingUpWorkflowFromPersistenceDB
. - Create a workflow:
Open ...
Get Microsoft Windows Workflow Foundation 4.0 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.