StepOptions
Configuration options for workflow steps that control variable mapping, execution conditions, and other runtime behavior.
Usage
workflow.step(processOrder, {
variables: {
orderId: { step: "trigger", path: "id" },
userId: { step: "auth", path: "user.id" },
},
when: {
ref: { step: "auth", path: "status" },
query: { $eq: "authenticated" },
},
});
Properties
variables?:
Record<string, VariableRef>
Maps step input variables to values from other steps
when?:
StepCondition
Condition that must be met for step execution
VariableRef
step:
string | Step | { id: string }
Source step for the variable value
path:
string
Path to the value in the step's output