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.Documentation Index
Fetch the complete documentation index at: https://docs.twine.se/llms.txt
Use this file to discover all available pages before exploring further.
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 defined: inverse — trips when the assign has any value. Useful for “skip if already exists” flows.
- value is empty (default): trips on
- 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.
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," "(whitespace),[nil],%{a: nil}, and any struct are not empty — they’re real values. Pick value is nil if you want only the literal nil to trip.