Workflow Foundation beta 2.2 and the Persistence Service

I’ve wasted an hour on this matter this afternoon,  but it seems that the Workflow Foundation engine beta 2.2  makes call to the MS DTC while using the (default) SqlPersistence service AND the TrackingService.
To use this persistence service :
1° Add the tracking and persistence service s
workflowRuntime.AddService(new SqlTrackingService(connectionString));
workflowRuntime.AddService(new SqlWorkflowPersistenceService(…));
2° start MSDTC
Add the SharedConnectionWorkflowCommitWorkBatchService :
workflowRuntime.AddService(new SharedConnectionWorkflowCommitWorkBatchService(connectionString));
You can only use the SharedConnectionWorkflowCommitBatchService if both services have the same connection string (server and db) : this is for performance enhancement : only one connection will be used for the services.
If you upgrade from beta 2 to 2.2 don’t forget to reinstall the news db scripts located at :C:\WINDOWS\WinFX\v3.0\Windows Workflow Foundation\SQL\En (start the schema followed by tle logic file).
Have fun…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s