开发者

InstanceOwnerException when running Workflow Foundation 4

I am running Workflow 4 activities, and using SQL Durable Instancing to persist the Workflow when it's suspended. I am intermittently getting an InstanceOwnerExc开发者_开发百科eption, which is remedied by recreating the instance store. Is there any way of avoiding this exception in the first place?

System.OperationCanceledException: An error processing the current work item has caused the workflow to abort.  See the inner exception for details. ---> System.Runtime.DurableInstancing.InstanceOwnerException: The execution of an InstancePersistenceCommand was interrupted because the instance owner registration for owner ID '55413a1f-0e3f-4a0f-b2b0-54c121aa0c52' has become invalid. This error indicates that the in-memory copy of all instances locked by this owner have become stale and should be discarded, along with the InstanceHandles. Typically, this error is best handled by restarting the host.
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.Runtime.DurableInstancing.InstanceStore.EndExecute(IAsyncResult result)
   at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult.OnPersisted(IAsyncResult result)
   at System.Runtime.AsyncResult.SyncContinue(IAsyncResult result)
   at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult.Persist()
   at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult.CollectAndMap()
   at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult.Track()
   at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult.InitializeProvider()
   at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult..ctor(WorkflowApplication instance, TimeSpan timeout, PersistenceOperation operation, Boolean isWorkflowThread, Boolean isInternalPersist, AsyncCallback callback, Object state)
   at System.Activities.WorkflowApplication.BeginInternalPersist(PersistenceOperation operation, TimeSpan timeout, Boolean isInternalPersist, AsyncCallback callback, Object state)
   at System.Activities.WorkflowApplication.OnBeginPersist(AsyncCallback callback, Object state)
   at System.Activities.Runtime.ActivityExecutor.PersistenceWaiter.PersistWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
   --- End of inner exception stack trace ---

The code is running on Azure, using SQL Azure to persist the Workflows. There are roles that are accessing the same instance store.


This actually turned out to be down to attempting to resume a workflow after it had already finished.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜