Blocks
If / else
The if step: route down a true or false path based on a condition over the upstream payload.
The two-way branch: a condition over the upstream payload routes execution down the true or false port. The other branch's steps are skipped.
Config
One expression; truthy fires true, falsy fires false.
The condition is an expression with payload bound to the
immediate upstream step's output:
payload["amount"] > 1000
payload["status"] == "active" and payload["score"] >= 50
String.contains?(payload["email"] || "", "@example.com")
Bracket access (payload["field"]), comparison/boolean/arithmetic
operators, and a small allowlist of helpers (String.*, Map.*,
Enum.* without functions, is_nil) are available — it's a small
expression sandbox, not a general programming language.
Output
The upstream payload passes through unchanged on whichever port fired — if doesn't transform data, it only routes it.
Patterns
- Threshold gate — big orders to an approval, small ones straight through.
- Found check — after a get from store,
branch on
payload["found"]. - Error lane — after a step with on-error
continue, branch onpayload["ok"]to notify on failures.
Gotchas
- Wire both ports. An unwired false branch silently drops every non-matching payload — the run just ends there.
- The condition reads the immediate upstream output only. Pull earlier values forward with set fields first if the decision needs them.
- Per-item filtering of a list is reshape's filter task — if is a single yes/no on the whole payload.