Portal Community

What a Condition Does

An edge condition is a JavaScript expression evaluated against the execution context at the moment the source node completes. The edge is followed only if the expression evaluates to a truthy value.

// Example conditions:
$output.httpRequest1.body.status === 'active'
$json.amount > 1000 && $json.currency === 'USD'
$var.retryCount < 3
Array.isArray($output.dbQuery1.rows) && $output.dbQuery1.rows.length > 0

Adding a Condition via EdgeEditModal

1

Select the Edge

Click the edge line to select it. A pencil icon appears at the midpoint.

2

Open the EdgeEditModal

Click the pencil icon, or double-click the edge, or right-click → Edit Condition.

3

Enter the Condition

Type a JavaScript expression in the Condition field. The editor provides autocomplete for $json, $output, $var, and $global.

4

Optionally Set a Label and Priority

Add a human-readable label (shown on the canvas) and a priority number (1 = evaluated first) if this port has multiple edges.

Priority and Multiple Conditions

When a node's output port has multiple edges, each edge's condition is evaluated in priority order (ascending: 1 first). The first edge whose condition is truthy is followed. Edges with no condition always evaluate to true.

Default Edge Behaviour An edge with no condition set is always followed (condition = true). If a node has two output edges and neither has a condition, both are followed in parallel. To route exclusively to one path, add a condition to each edge — at least the fallback edge should have true as an explicit default.

Condition Context Variables

VariableContains
$jsonThe trigger node's initial data
$output.{nodeId}Output of any previously executed node
$var.{name}Workflow variables set by variable-assignment nodes
$global.{key}Tenant-level constants configured in platform settings
$context.executionIdCurrent execution ID
$context.triggeredByUser ID who started the workflow