Parallel execution
WOML
<parallel
id="checks"
name="Run checks"
description="Check stock and risk concurrently."
concurrency="2"
on-error="wait-all"
>
<step id="stockCheck"><script>return checkStock();</script></step>
<step id="riskCheck"><script>return checkRisk();</script></step>
</parallel>| Attribute | Required | Meaning |
|---|---|---|
id | Yes | Stable parallel-group identity; not a context output. |
name, description | No | Display metadata. |
concurrency | No | Maximum active children; defaults to child count and cannot exceed it. |
on-error | No | fail-fast or wait-all; defaults to fail-fast. |
Rules:
- It contains one or more direct
<step>children only. - Every child sees the same pre-fork context.
- Siblings cannot reference each other's output.
- Each child publishes its own
context.steps.<id>value. - The group has no aggregate output.
fail-faststops unstarted children and requests cancellation of active children;wait-alllets all children settle. Both fail the group if any child fails.- Add a downstream step to create one final aggregate result.
Use <parallel> for several independent single-step operations. Use <fork> for concurrent lanes containing multiple steps.