问题
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:
- Restarted my application, How would I retrieve last persisted application instance from database and load it for later bookmark resumption?
- 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