Workflow instances are not persisted when they should be
See original GitHub issueAs demonstrated in the code at https://github.com/craigfowler/elsa-core/commit/672e32a7caae61355e928bc4c299e3687f468d17 (the new test added in this commit), the workflow instance which is created in this test never makes it to the MongoDb persistence store. This is despite the workflow including a UserTask
activity which would suspend the workflow and preventing it from completing immediately.
This issue is to diagnose and fix this issue with workflow persistence. It has been proven to affect MongoDb and also anecdotally affects Entity Framework. Update: This is confirmed to affect all persistence, not just MongoDb.
Acceptance criteria
- A workflow should be persisted at at least one point after it has begun executing
- Test coverage must be added to prove that this works with at least an in-memory persistence store (ideally add a MongoDb test case as well)
- The default persistence behaviour for a workflow should be altered to be
WorkflowPersistenceBehavior.WorkflowBurst
(currently it is implicitlySuspended
)
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Non-Persisted Workflow Instances - .NET Framework
The workflow instance experiences an exception before it is persisted for the first time. Depending on the UnhandledExceptionAction returned, ...
Read more >Persistence Best Practices - .NET Framework
A workflow instance cannot be recovered in case of a host or computer failure if it has not been persisted. In general, we...
Read more >Persisted Instances Node
This node, under Advanced Diagnostics in the Workflow Administration Console, shows workflow instances that are still running but are not actively doing ...
Read more >Chapter 8:Workflow Persistence
Persisting a workflow instance doesn't require any manual intervention from you; it is something that is controlled by the workflow runtime engine and...
Read more >Administering Workflow Instances | Adobe Experience Manager
Using Navigation select Tools, then Workflow. · Select Failures to display the list of workflow instances that did not complete successfully. · Select...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI I’ve repro’d this with in-memory persistence as well, so it seems like it affects all persistence providers (as @rzvdaniel suggested might be the case).
Very interesting explanation, @craigfowler.
Some of the above can easily go into documentation, like a QA section where you answer the question “Why my workflow instances aren’t persisted”? Same for the explanation of WorkflowPersistenceBehaviors, it can be a section in the Workflow Persistence chapter.
This ticket is revealing more details that you may have been thinking in the beginning.