Forks and branches
Use a fork for several independent, concurrent, multi-step routes:
WOML
<fork id="distribution" join="instagram facebook">
<branch id="tiktok">
<step id="prepareTikTok"><script>return prepareTikTok();</script></step>
<step id="publishTikTok"><script>return publish(context.steps.prepareTikTok);</script></step>
</branch>
<branch id="instagram">
<step id="publishInstagram"><script>return publishInstagram();</script></step>
</branch>
<branch id="facebook">
<step id="publishFacebook"><script>return publishFacebook();</script></step>
</branch>
</fork><fork> attributes:
| Attribute | Required | Meaning |
|---|---|---|
id | Yes | Stable fork identity. |
join | No | all, none, or a whitespace-separated list of branch IDs. Omission means all. |
<branch> requires id and optionally accepts name and description. It must be non-empty and may contain multiple steps, choices, switches, parallel groups, and approvals.
Execution rules:
- Branches begin concurrently; each branch remains sequential internally.
- A branch sees context available before the fork and earlier outputs in that branch, never sibling outputs.
- The main continuation waits only for selected joined branches.
- Only joined branch outputs become visible to the continuation. Completion timing never makes an unjoined output visible.
join="none"releases the continuation without waiting.- Even after the continuation is released, the workflow itself does not report success until every fork-owned branch settles.
- A failure in a joined branch blocks the continuation. An unjoined failure does not block it, but the overall workflow still settles as failed after all branches finish.
- Nested forks anywhere inside a fork-owned branch subtree are rejected in v1.
- A terminal fork preserves the last earlier main-route value. A workflow made only of a result-less fork is invalid.