Giter Site home page Giter Site logo

Comments (1)

sfmskywalker avatar sfmskywalker commented on June 17, 2024

Issue Summary:

  1. 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.
  2. State Extraction and Persistence Flaws:

    • The process of converting a workflow instance into a WorkflowExecutionContext and then back to a WorkflowInstance model does not account for cancelled ActivityExecutionContexts. 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.
  3. 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.
  4. 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.

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.

image

from elsa-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.