Comments (1)
Issue Summary:
-
Cancellation Handling:
- When a workflow instance is cancelled, the cancellation is properly enacted, but there are shortcomings in how the system captures and persists this state. Specifically, the system fails to retain a complete final state of the altered workflow instance.
-
State Extraction and Persistence Flaws:
- The process of converting a workflow instance into a
WorkflowExecutionContext
and then back to aWorkflowInstance
model does not account for cancelledActivityExecutionContexts
. This omission leads to the system not recognizing cancelled activities as part of the final state. - Moreover, new execution log records are not persisted by the
AlterationRunner
, which is critical for maintaining a comprehensive execution history.
- The process of converting a workflow instance into a
-
Pipeline Execution and Middleware Issues:
- Attempts to manually apply alterations outside the middleware pipeline were ineffective because the
PersistBookmarkMiddleware
component would not detect bookmark removal due to the pre-cancellation removal of bookmarks.
- Attempts to manually apply alterations outside the middleware pipeline were ineffective because the
-
Proposed Solutions:
- To address these issues, a new approach was proposed that involves creating a
RunAlterationMiddleware
, which would serve as the terminal component of the middleware pipeline, ensuring that all necessary states and records are processed and persisted. - A PR was created to clone the workflow execution pipeline and replace the terminal component with
RunAlterationMiddleware
. This change aligns the alterations process with the current pipeline setup, even when custom configurations are used during application bootstrap.
- To address these issues, a new approach was proposed that involves creating a
Result of Changes:
- With the new changes, cancelling activities now correctly updates their execution records to the
Canceled
state. - Associated bookmarks are also appropriately deleted, resolving any route ambiguities that arise from the creation of bookmarks during the workflow trigger.
- Workflow execution log records are now preserved, ensuring accurate recording of actions in the journal.
from elsa-core.
Related Issues (20)
- ExecutionLogMiddleware use ActivityNode to check if that avitivy already bookmarked, which might be wrong if looping activity used HOT 2
- Optimize SQL Query Execution for HTTP Workflows HOT 1
- Optimize HTTP Workflows by Avoiding Unnecessary Distributed Locks
- Open Suspended instance HOT 10
- An error in "Elsa.Workflows.Runtime.RunTask.cs" HOT 3
- Fault Persists in Child Workflow Post-Alteration Causing Suspension
- [Perf] JsonSerializationOption instances should be reused HOT 1
- Wrong IsLatest value due to exceptions during draft saving in Elsa 2 HOT 4
- Temporary consumers create queue without listener
- Activity fails when resuming with bookmark HOT 7
- Distributed messaging issues
- The type 'RequiredMemberAttribute' exists in both Elsa.Workflows.Management and System.Runtime HOT 2
- EFCore.BulkExtensions is a very heavy dependency HOT 1
- Support Programmatic Definition of Dynamically Provided Activities HOT 1
- Elsa3.1.0 package dependency HOT 4
- How to modify the language HOT 1
- Startup Error Due to Missing `IEndpointChannelFormatter` Service in Elsa 3.1.0 HOT 1
- Alteration Document Error HOT 3
- Expose MassTransit settings for higher throughput HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elsa-core.