Skip to content
DocsOpen Hub
Node reference

Condition and Decision nodes

On this page

Use a Condition for one boolean choice and a Decision for ordered routing rules. Both change which path executes, so test every outcome with representative input.

Condition: true or false#

A Condition runs Python and interprets its result as a boolean. Connect the true and false outputs to their intended targets.

For a preceding Function named ItemCount that returns a validated integer:

python
return int("${ItemCount}") > 0

Read inputs through selectors and validate their expected types. Return a boolean result rather than a JSON object such as {"allowed": true}. An exception is a failed execution, not the false branch.

When the Condition chooses a branch, execution follows that branch; it does not also follow an unrelated ordinary next connection in the same hop.

Decision: first matching rule#

A Decision evaluates its enabled rows in order. Each row compares left and right operands with its configured operation. The first true row with a connected target selects the branch.

For example, route a normalized priority value to an urgent path or a standard path. Keep rules mutually understandable, and put more specific rules before broader ones. A later rule may never run if an earlier rule always matches.

Plan the unmatched case#

Do not assume an implicit fallback exists. Review what happens when no Decision row matches and configure a deliberate fallback path using the editor's supported rules or another explicit branch.

Use these test cases:

  • Each positive rule independently.
  • False and unmatched values.
  • Missing, empty, and null input.
  • Values with an unexpected type or casing.

Keep authorization on every path#

Place shared authorization and validation before branching when every branch needs them. When editing an existing graph, preserve all branch connections and inspect the executed path afterward. A visually intact branch can still point to the wrong node after rewiring.

Need to investigate a problem? Start with troubleshooting