Windows Workflow Foundation 4 (WF4) Bookmark
        Posted  
        
            by Russ Clark
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Russ Clark
        
        
        
        Published on 2010-04-23T12:31:52Z
        Indexed on 
            2010/04/23
            12:33 UTC
        
        
        Read the original article
        Hit count: 1645
        
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);
        © Stack Overflow or respective owner