locked
In Workflow Service 4.0 Instance is not getting Idle immediately after persisting the workflow RRS feed

  • Question

  • Hi,

                I have developed a long running workflow service,When i am trying to invoke the workflow service methods based on the BlockingBookmarks in the instance table for a particular instance i am getting error frequently,beacause once i get the instance id from the workflow i am trying to get the BlockingBookmarks  for that instance to invoke the next possible service methods, the problem is the workflow service instance is not getting Idle immediately after persisting the workflow but its returning the instance id once it got persisted in the instance table,So at the moment the BlockingBookmarks showing "Null" and ExecutionStatus is showing "Executing".

    For that got solution from the forum that timeToUnload needs to be set as 0

     <workflowIdle timeToUnload="0"/>

    Eventhough the workflow is getting idle approx. 1-2 sec after persisting the workflow.

    Please let me know any alternatives.

    Thursday, January 20, 2011 10:58 AM

Answers

  • As you have discovered the persistence provider is highly asynchronous in nature.

    You are creating a race condition by trying to read the BlockingBookmarks table immediately.

    May I ask why you want to do this?  Is it a test scenario of some kind?  Perhaps we can give you a better alternative.


    Sr. Program Manager, AppFabric Development Platform (WF/WCF) http://blogs.msdn.com/rjacobs http://www.twitter.com/ronljacobs
    • Proposed as answer by Jeff Cao Tuesday, January 25, 2011 6:37 AM
    • Marked as answer by Andrew_Zhu Thursday, January 27, 2011 5:01 AM
    Saturday, January 22, 2011 11:34 PM