How do I get last persisted workflow instance Id to reload it?

笑着哭i 提交于 2019-12-11 05:29:51

问题


Lets say I have persisted self-hosted workflows (running locally IIS express) that use WorkflowApplication programmatically by using the SqlWorkflowInstanceStore object model.

app.PersistableIdle = delegate(WorkflowApplicationIdleEventArgs e)
{
    return PersistableIdleAction.Unload;
};

Then, I accidentally / deliberately stopped my web application, restarted my visual studio (local development).

My questions:

  1. Restarted my application, How would I retrieve last persisted application instance from database and load it for later bookmark resumption?
  2. How would i get ID of last persisted workflow instance Id and reload it using Reload method?

回答1:


In every instance of workflow I've seen, the Workflow Instance IDs are stored in a separate database so that the system can decide, based on criteria stored with the ID, which workflow to restart from the persistence database.



来源:https://stackoverflow.com/questions/39770577/how-do-i-get-last-persisted-workflow-instance-id-to-reload-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!