
Condition node
Condition Node
Overview
The Condition Node evaluates one or more boolean expressions and routes the incoming payload to either the True or False output. It is the primary branching mechanism for Maestro pipelines, supporting everything from simple comparisons to complex expressions that reference broader pipeline context. Both branches preserve upstream metadata and attach decision details so downstream steps can understand why a particular path was taken.
Core Functionality
1. Multiple Condition Support
- Define any number of conditions in the
conditionsarray. - Each condition can be a literal boolean, a simple comparison, or a full Maestro expression written in JavaScript.
- Combine multiple entries with a logical operator (
ANDorOR) to express compound rules.
2. Expression-Driven Logic
- Conditions execute in the Maestro expression engine with access to
$input,$inputs,$node,$pipeline, iteration context, and other helpers. - Template syntax (
{{ ... }}) enables dynamic branching based on live data, such as{{ $input.status === "active" }}.
3. Dual Output Ports
True: Receives the original payload when the combined expression evaluates totrue.False: Receives the payload when the expression resolves tofalse.- Both outputs include metadata like
condition_result, the evaluatedconditions, thelogical_operator, andprocessed_by="condition"while preserving upstream fields.
4. Validation & Safety Checks
- Saves are rejected if the conditions list is empty, malformed, or evaluates to non-boolean values.
- The logical operator must resolve to
ANDorOR; expressions are allowed but must produce valid values.
Configuration Reference
Parameters Configuration
Settings Configuration
Parameters (Dynamic Data)
| Field | Type | Default | Description |
|---|---|---|---|
| Conditions | array<string> | [] | Required list of boolean expressions that evaluate to true or false. |
| Logical Operator | string | "AND" | Combines individual results; accepts "AND" or "OR" and can be driven by expressions. |
| Debug Mode | boolean | false | Enables verbose evaluation logs for troubleshooting. |
Each entry in conditions can be:
- A literal boolean (
true,false). - A simple comparison (
status === "active"). - A templated expression (
{{ $input.score > 75 }}). - A JavaScript snippet that leverages pipeline context or helper functions.
Settings (Static Configuration)
| Field | Type | Default | Description |
|---|---|---|---|
| Retry on Fail | boolean | false | Rarely necessary, but available if infrastructure hiccups interrupt evaluation. |
| On Error | string | "Stop Pipeline" | "Stop Pipeline" halts the branch, "Continue Execution" forwards payloads on the false path, "Retry Node" replays evaluation under retry rules. |
| Notes | string | "" | Document the business rule for future reviewers. |
| Display Note in Pipeline | boolean | false | Show the note on the canvas so intent is visible without opening the node. |
Usage Examples
Example 1: Approve Qualified Lots
| Field | Value |
|---|---|
| Conditions | ["lotStatus === 'released'"] |
| Logical Operator | AND |
| Notes | Only released lots proceed to packaging. |
Any lot marked released exits via the trueCondition port; everything else continues down the rejection path.
Example 2: Flag High-Risk Orders
| Field | Value |
|---|---|
| Conditions | ["orderValue > 10000","customerTier === 'new'"] |
| Logical Operator | AND |
| On Error | Continue Execution |
Both rules must pass for the order to be considered high risk. If evaluation fails, the branch defaults to falseCondition so processing continues safely.
Example 3: Prioritize Assembly Line Alerts
| Field | Value |
|---|---|
| Conditions | ["alertLevel >= 3","lineName === 'Line-A'"] |
| Logical Operator | OR |
| Debug Mode | true |
| Timeout (ms) | 1500 |
This configuration escalates whenever a critical alert arrives or the affected line is Line-A. Debug logging captures the evaluated conditions for operators reviewing incidents.

