Composition and Termination
call invokes another Workfile as a step.
- refund: call: workflows/refunds/process.yaml with: { account: "{{ enrich.billing.lookup.id }}" } timeout: 7dThe path is a string literal, resolved from the project root, and MUST NOT contain an expression.
with supplies the callee’s inputs. It is a projection, evaluated in the calling scope. Implementations MUST supply a value for every input that the callee declares required, and MUST reject a name that the callee does not declare.
The step binds the callee’s outputs projection. A path into the step resolves against the callee’s declared output names. A call on a callee that declares no outputs binds an empty result, and any path into the step is a validation error.
Implementations MUST resolve a callee in order to validate a call. The resolution is recorded with every run.
Depth. A Workfile that contains a call step MUST NOT be the target of a call. The call graph is therefore at most two documents deep, and no cycle is possible. Deeper composition requires extraction into a separately invoked Workfile.
sub-workflows is a capability.
stop ends the run, wherever it appears. A stop inside a for_each iteration or a parallel branch ends the run, and does not end only that iteration or branch. Implementations MUST cancel sibling work that is in progress.
stop ends the run early and successfully, with the recorded outcome stopped and the given reason. Steps after it do not execute, and are recorded with the outcome not_run. stop is not a failure, and recovery policy does not apply to it. It is usually guarded:
- no_change: when: "{{ scrape.value == previous.value }}" stop: "value unchanged since last check"Implementations MUST evaluate outputs after a stop. A stop in a callee ends the child run successfully, and the calling step binds the callee’s outputs.