question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Workflow instances are not persisted when they should be

See original GitHub issue

As 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 implicitly Suspended)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
craigfowlercommented, Mar 8, 2021

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).

1reaction
rzvdanielcommented, Mar 11, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found