On this page
Condition
Workflow reference | Boolean functions
Kind: Condition
Configuration object: condition
Use Condition to choose which outgoing connections receive the incoming data. It supports decisions based on values, comparisons, and established variables.
Inputs
Receives the current typed input, named incoming bindings, and established variables. Configure the predicate against those values. At a join, prefer named inputs because the combined input is text.
Configuration
condition is an expression object with function, value, and arguments, following the expression structure. Its result must be an actual JSON Boolean.
Outgoing connections can set condition to true or false. An omitted connection condition is unfiltered and remains active on either result. Only a Condition step can have branch-filtered outgoing edges.
Use comparisons or Boolean functions for ordinary predicates. Input, variable, get, JSON parse, coalesce, assert, and Boolean literals are also accepted when their result is a Boolean. String "true", numeric values, and null are rejected as condition results.
Outputs
The output is the incoming data, unchanged. The Boolean selects branches and is reported in activity. To output a computed Boolean value as data, configure the same predicate in an Expression step.
Destinations on inactive branches are skipped unless another incoming connection remains active. At a join, inactive named bindings become null, and the step waits for all predecessors to settle.
Example
{
"id": "approval-gate",
"name": "Check the approval threshold",
"kind": "Condition",
"condition": {
"function": "greaterThan",
"arguments": [
{ "function": "input", "value": "input.total" },
{ "function": "literal", "value": "1000" }
]
}
}
Add the destination steps, then add these connections:
[
{
"source": "approval-gate",
"target": "request-approval",
"inputName": "quote",
"condition": true
},
{
"source": "approval-gate",
"target": "process-quote",
"inputName": "quote",
"condition": false
}
]
Input {"total":1500} activates request-approval, which receives the quote object. A total of 1,000 or less activates process-quote. A missing or nonnumeric total fails the numeric comparison; validate or provide a deliberate fallback before the predicate when needed.