Skip to Content
CraftBot Docs v1 — internal preview

Sub-flow Exit

The Sub-flow Exit node ends a callable sub-flow and hands control back to the parent recipe at its Sub-flow Call node’s on_return port. Configured output variables are flushed back into the parent’s scope as the child session terminates.

Configuring the node

  1. Drop the Sub-flow Exit node onto the canvas. It is a terminal node — it has an input port and no output ports.
  2. Open the configuration drawer.
  3. Set Output variables — a comma-separated list of variable names in the sub-flow’s scope that should be passed back to the parent. The parent-side mapping (which parent variable receives each name) is configured on the Sub-flow Call node.

Input port

  • in — terminates the sub-flow when reached.

Where it’s used

Every callable sub-flow needs at least one Sub-flow Exit to signal a clean return to the parent. Use multiple Sub-flow Exit nodes when the sub-flow has more than one logical end point — for example, “verified”, “not_verified”, “abandoned” — and branch into them from upstream Condition or Button nodes.

Best practices

  • Name your output variables consistently with the parent recipe’s expected mappings. A typo here means the parent receives undefined.
  • Keep the output variable list minimal. Pass only what the parent actually consumes; everything else stays in the (now-terminated) child session.

See also

Last updated on