Skip to main content
Version: 2.1
Condition Node interface

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 conditions array.
  • 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 (AND or OR) to express compound rules.

2. Expression-Driven Logic

  • Conditions execute in the Maestro expression engine with access to $node, $trigger, $execution, and iteration context ($item, $index). See Expression Variables for the full reference.
  • Template syntax ({{ ... }}) enables dynamic branching based on live data, such as {{ $node["Set"].status === "active" }}.

3. Dual Output Ports

  • True: Receives the original payload when the combined expression evaluates to true.
  • False: Receives the payload when the expression resolves to false.
  • Both outputs include metadata like condition_result, the evaluated conditions, the logical_operator, and processed_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 AND or OR; expressions are allowed but must produce valid values.

Configuration Reference

Parameters

ParameterTypeDefaultRequiredConstraintsDescription
Conditionsstring[][""]YesAt least 1 non-empty expressionArray of boolean expressions using {{ }} syntax.
Logical Operatorselect"AND"If multiple conditionsAND / ORHow multiple conditions are combined.

Settings

SettingOptionsDefaultDescription
Timeout (seconds)numberPipeline defaultMaximum execution time for this node (1--600).
Retry on TimeoutPipeline Default / Enabled / DisabledPipeline DefaultWhether to retry on timeout.
Retry on FailPipeline Default / Enabled / DisabledPipeline DefaultWhether to retry on failure. When Enabled, shows Advanced Retry Configuration.
On ErrorPipeline Default / Stop Pipeline / Continue ExecutionPipeline DefaultBehavior when node fails after all retries.

Advanced Retry Configuration (only visible when Retry on Fail = Enabled):

FieldTypeDefaultRangeDescription
Max Attemptsnumber31--10Maximum retry attempts.
Initial Delay (ms)number1000100--30,000Wait before first retry.
Max Delay (ms)number1200001,000--300,000Upper bound for backoff delay.
Multipliernumber2.01.0--5.0Exponential backoff multiplier.
Jitter Factornumber0.10--0.5Random jitter.

Usage Examples

Example 1: Approve Qualified Lots

FieldValue
Conditions["lotStatus === 'released'"]
Logical OperatorAND
NotesOnly 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

FieldValue
Conditions["orderValue > 10000","customerTier === 'new'"]
Logical OperatorAND
On ErrorContinue 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

FieldValue
Conditions["alertLevel >= 3","lineName === 'Line-A'"]
Logical OperatorOR
Debug Modetrue
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.