Skip to main content

Module engine

Module engine 

Source
Expand description

FlowEngine — the central API for managing workflow executions.

FlowEngine wraps a NodeRegistry and an in-memory execution map. It is the recommended entry point for applications that need lifecycle control over running workflows.

§Lifecycle

                   ┌──────────┐
            start  │ Running  │ ←──────────── resume
          ────────►│          │
                   └────┬─────┘
              pause │   │ node error / all nodes done / terminate
                    ▼   ▼
                ┌────────────┐   ┌───────────┐   ┌────────────┐
                │   Paused   │   │ Completed │   │   Failed   │
                └────────────┘   └───────────┘   └────────────┘
                                                 ┌────────────┐
                                                 │ Terminated │
                                                 └────────────┘

Pause takes effect at the next wave boundary — the current wave of concurrently executing nodes runs to completion first. Terminate interrupts the engine between or within waves and is reflected as soon as the runner task observes the cancellation signal.

Structs§

FlowEngine
Central entry point for managing workflow executions.