locked
Workflow un-loads immediately before allowing me to resume bookmark. RRS feed

  • Question

  • I have a Workflow with a single activity that creates a bookmark. My persistableidle action is to Unload the workflow. This works fine. The workflow is persisted with the bookmark is created.

    I then load the workflow from the instancestore. My persistableidle action is to Unload the workflow. Before I can call resumebookmark it calls the persistableidle event and persists the workflow again. I then get the error that the workflow has been unloaded. Why does it immediately call the persistableidle?

    I get a InstanceLocked exception if I use the persistableidle action persist.

     

     

    Wednesday, July 14, 2010 11:39 AM

Answers

  • Fixed it. Order of code incorrect.

    My code was:

    application.Load(instanceId);
    
    application.PersistableIdle = (e) =>
    
    {
    
    return PersistableIdleAction.Unload; 
    
    };
    

    It must be:

    application.PersistableIdle = (e) =>
    
    {
    
    return PersistableIdleAction.Unload; 
    
    };
    application.Load(instanceId);
    
    
    • Marked as answer by devgal169 Wednesday, July 14, 2010 2:19 PM
    Wednesday, July 14, 2010 2:18 PM