Expand description
Workflow execution engine.
§Parallel Fan-out / Fan-in
WorkflowExecutor::execute automatically discovers independent groups
of tasks — tasks whose dependencies are all satisfied at the same time —
and launches them concurrently. When all tasks in a fan-out group complete
the join point (fan-in) tasks are unblocked. This happens naturally through
the dependency-tracking loop; no explicit graph analysis is required.
§Scheduling correctness
A task whose dependencies are not yet satisfied is retried on the next
pass, never dropped: the scheduler repeatedly rescans the set of
not-yet-dispatched tasks (a fixpoint loop) until every task has either
run to completion, been synthetically completed from a checkpoint, or
been skipped. WorkflowState::Completed is returned only when that
fixpoint is reached with an empty failure set. A real task failure, or a
dependency that can never be satisfied because an upstream task failed or
was skipped, is reported as WorkflowState::Failed (or a scheduling
WorkflowError if no task can ever become ready again) — never
silently downgraded to a fabricated success.
§Pause / Resume
Call WorkflowExecutor::pause to signal the executor to stop launching
new tasks after the current wave completes. The checkpoint is serialised to
a JSON string containing the completed task IDs and execution context
variables. Pass that string to WorkflowExecutor::resume_from_checkpoint
to reconstruct the state and continue.
Structs§
- Default
Task Executor - Default task executor implementation.
- Execution
Checkpoint - Serializable checkpoint for pause/resume of workflow execution.
- Execution
Context - Execution context shared across task executions.
- Execution
Result - Workflow execution result.
- Status
Update - A buffered status update pending persistence.
- Workflow
Executor - Workflow executor.
Enums§
- Workflow
Control - High-level control signal for a running
WorkflowExecutor.
Traits§
- Task
Executor - Task executor trait.
Functions§
- parse_
condition - Parse and evaluate a single condition expression against the execution context.