Welcome to MSDN Blogs Sign in | Join | Help
How to lock a workflow instance using SqlWorkflowPersistenceService?

SqlWorkflowPersistenceService, the out-of-box persistence service in WF, provides a mechanism to lock workflow instances. Instance locking is required if you want to run a workflow in different hosts and ensure that it is loaded in one and only one host at a given time. While answering one of the questions http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=371851&SiteID=1  on WF forum, I created a simple workflow which is accessed by 3 hosts. I have uploaded the sample here for those who are interested. Take a look at it and let me know if you have any questions!

Posted: Friday, April 28, 2006 7:06 PM by sonalic

Attachment(s): WorkflowInMultipleHosts.EXE

Comments

perper said:

Hello Sonali,

I wonder whether you will be so kind to help again on that topic though more then an year left since your post. I red the posts related as given in the URL above and played with the example you provided(WorkflowInMultipleHosts.exe)

I have tried the workaround with SqlWorkflowPersistenceService that takes a NameValueCollection but still have unlocked = 1

I have got my DistributedTransactionCoodrinator started as well.

I am using SQLEXPRESS 2005, VS2008, and Vista Business

I will highly appreciate your help.

Kind regards, Alexander

# November 26, 2007 9:18 AM
Anonymous comments are disabled
Page view tracker