Getting InstanceNotReadyException for a persisted workflow?

Answered Getting InstanceNotReadyException for a persisted workflow?

  • Monday, August 06, 2012 6:48 AM
     
     

    We're using a State Machine Workflow in WF4 with WorkflowApplication, and SqlWorkflowInstanceStore for persistence. Things work as expected, ie, we can create a workflow, resume it later for all the different bookmarks, no problems at all.

    After we update the database using our database deployment package, we consistently start getting this exception whenever we try to load an existing workflow:

    The execution of an InstancePersistenceCommand was interrupted because the instance '<guid>' has not yet been persisted to the instance store.

    at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)

    at System.Runtime.DurableInstancing.InstancePersistenceContext.OuterExecute(InstanceHandle initialInstanceHandle, InstancePersistenceCommand command, Transaction transaction, TimeSpan timeout)    

    at System.Activities.WorkflowApplication.LoadCore(TimeSpan timeout, Boolean loadAny)     at System.Activities.WorkflowApplication.Load(Guid instanceId, TimeSpan timeout)    

    at System.Activities.WorkflowApplication.Load(Guid instanceId)    

    However the instances are definitely serialized - I've taken snapshots of the tables before and after the exception starts happening, and there are no changes at all, so the error message is misleading. I can't find any evidence that the database update is actually doing anything that could affect the workflow tables at all.

    What else could cause this type of error to occur? This is a serious problem for us.

    Any help appreciated.

    Thanks,

    Sam

All Replies