
Microsoft Windows Workflow Foundation 4.0 Cookbook
By :

When the workflow instance is persisted, some additional data may need to be persisted along with the workflow instance. For example, in web applications, different HTTP requests are initialized by different people. So, to make sure our workflow instance is aware of its owner, we should store the user information along with the workflow instance.
We need to make sure we have finished the task of Loading a persisted workflow from the database, which we have seen earlier in this chapter.
Create a workflow project:
Create a new Workflow Console Application under solution Chapter06
and name the project as UsingPersistenceParticipant
.
Create a custom persistence participant:
Add project references to System.Activities.DurableInstancing
and System.Runtime.DurableInstancing
. Add a new code file to project and name the file MyPersistenceParticipant.cs
. Fill the file with the following code:
usingSystem.Activities...
Change the font size
Change margin width
Change background colour