我们编写了一个自定义InstanceStore。 我可以序列化(Persist)和反序列化(WorkflowApplication.Load)存储,但是在恢复之前,调用ResumeBookmark()会再次启动工作流。
WorkflowApplication wfApp = CreateWorkflowApplication();
var workflowInstanceId = wfApp.Id;
wfApp.Run();
string bookmarkName = workflowInstanceId.ToString();
_unloadedEvent.WaitOne();
/* create */
wfApp = CreateWorkflowApplication();
wfApp.Load(workflowInstanceId);
var result = wfApp.ResumeBookmark(bookmarkName, null); // <- this hits the BookmarkActivity while **IT SHOULD'NT**