Skip to main content

Module spec

Module spec 

Source
Expand description

What the schema generator writes for a workflow: its steps as data, and the one trait that performs what only typed code can.

A WorkflowSpec is the compiled form of a schema/workflows/<name>.workflow.yaml with config.executor: engine. The generated module carries it as JSON (WorkflowSpec::from_json) beside a WorkflowDefinition implementation, which does the three things a spec cannot say: call an entity’s generated service (create, update, delete, query, fetch), move a record through its state machine, and call the hand-written verbs and functions of the workflow’s Actions trait.

Structs§

Branch
One branch of a condition step; the first whose when holds is taken, a branch with no when is the else.
Call
What a WorkflowDefinition is asked to perform.
CompStep
One compensation step.
EmitSpec
An event a terminal step stages.
FailureSpec
What a step does when it fails.
Outcome
What a step does when it succeeds (or when a wait is answered or times out).
RetrySpec
The retry policy of a workflow or of one step.
StepSpec
One step.
WaitKey
One equality of a wait’s condition: the event’s field must equal the context expression.
WorkflowSpec
The compiled workflow.

Enums§

Backoff
How long to wait between attempts of a step that failed for a transient reason.
StepKind
What a step is.
Terminal
How a terminal step ends the instance.

Traits§

WorkflowDefinition
A workflow the engine can run: its spec, and what only typed code performs.