Skip to content

Suspendable flow executions #91

@merlinfuchs

Description

@merlinfuchs

To support components and modals in flows without having to have a separate entity like message templates it would be useful if flow executions would be suspendable. This means a flow execution can pause at a specific point and then continue once a button has been clicked or the modal has been submitted.

This would essentially split up each flow into a number of sub-flows. The transition between one sub-flow to another acts as a suspend point which pauses execution for an indefinite amount of time. In the case of buttons it would be necessary that we can continue from the same suspend point multiple times.

Each sub-flow inherits a copy of the state from the previous one, so it can access all the node results and args. Because we don't want to store all this information in memory it would make sense to make the flow state/context serializable.

Requirements:

  • We can create a snapshot of flow contexts
  • These snapshots are serializable
  • We have a table that stores these suspend points including the context snapshot and node ID to continue from
    • Suspend points can be deleted after usage (modals) or expire (components on ephemeral messages)
    • We can listen for message delete events to delete suspend points for non-ephemeral messages
  • Components and modals reference these suspend points
  • Make flows executable from a specific node id

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement to an existing feature

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions