Windows Workflow Foundation 4 (WF4) Bookmark
- by Russ Clark
I'm working with Visual Studio 2010 and have a workflow where I'm trying to resume a bookmark. The bookmark appears to be getting set just fine, but when I try to run the code below to resume it, I get an entry in the InstancesTable in the persistence database with the SurrogateLockOwnerID field set to an integer, usually this field is null, and I can no longer do anything with the workflow. I think this is indicating that I have some kind of blocking lock going on, but I can't find any references anywhere to the SurrogateLockOwnerID. Does anyone know what is causing this, and how to fix it?
WorkflowApplication workflowApp = new WorkflowApplication(new WebCARSWorkflow());
workflowApp.Extensions.Add(new SqlTrackingParticipant(ConnString));
InstanceStore instanceStore = new SqlWorkflowInstanceStore(ConnString);
workflowApp.InstanceStore = instanceStore;
workflowApp.Load(WorkflowInstanceId);
workflowApp.PersistableIdle = (waie) => PersistableIdleAction.Unload;
Approver actualApprover = new Approver(ProcessingStatus.Awaiting, my_RDA_Role,
"RDAGetPlayersFromExternalRoleURI", 14);
actualApprover.ActionDate = DateTime.Now;
Player actualPlayer = (Player)GetPlayer(login);
actualApprover.ActualPlayer = actualPlayer;
actualApprover.ApproverAction = action;
workflowApp.ResumeBookmark("ErrorOccurredBookmark", actualApprover);