Skip to main content
Bails out of the current path when an assign is in (or isn’t in) an expected state. The go-to tool for “stop if the lookup came up empty” and similar guardrails.

Configuration

  • Assign — which assign to inspect.
  • Bail when
    • value is empty (default): trips on nil, empty string, empty list, or empty map. Matches the common “upstream lookup found nothing” pattern.
    • value is nil: strict nil-only check. Empty strings/lists/maps pass through — useful when an empty collection is a real value.
    • value is falsey: trips on nil or false. Use when a boolean assign signals “go” vs “stop”.
    • value is defined: inverse — trips when the assign has any value. Useful for “skip if already exists” flows.
  • On bail
    • Skip branch (default): stop only this path. Parallel branches keep going. Inside Flow Each, the next iteration runs normally. Nothing is recorded as an error.
    • Halt flow: stop the whole run. Marked as aborted in the run history.
  • Reason (optional) — the message surfaced when the guard trips. Supports {assign_key} interpolation. Defaults to an auto-generated message.
  • Completion key (optional) — when set, a Skip branch bail also writes a completion marker for this key (the same store a Completion Guard reads). Supports {assign_key} interpolation. Halt flow bails never write a marker. Leave blank to disable.

Tips

  • Use Halt flow for invariants you want to fail loudly (e.g. “external id must be set before proceeding”). Use Skip branch for “best-effort” paths.
  • 0, false, a whitespace-only string, a list containing nil, a map with nil values, and any record are not empty — they’re real values. Pick value is nil if you want only the literal nil to trip, or value is falsey to treat false as a stop signal alongside nil.
  • Set Completion key to make this guard backfill the local completion store from a remote “already done” check: a cheap upstream Completion Guard on the same key then short-circuits future runs without re-querying the remote. Handy when adding completion-guarding to a flow that has already processed entities the local store never recorded.
  • Best practice: only set Completion key when a bail means the entity is permanently done — the natural fit is value is defined / “already exists”. With value is empty it permanently skips an entity whose lookup was only transiently empty.

Ports