true or false.
Command Type
Command Type ID: 1100Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| condition | SimpleCondition or ComplexCondition | The logical condition to evaluate | Yes |
| trueCommands | Array of Command | Commands to execute if the condition evaluates to true | Yes |
| timeout | number | Timeout for the command in milliseconds | Yes |
| context | string | Execution context for evaluating the condition. Defaults to "CommandResult" | No |
| falseCommands | Array of Command | Commands to execute if the condition evaluates to false | No |
SimpleCondition
| Field | Type | Description | Required |
|---|---|---|---|
| left | Operand | Left-side operand | Yes |
| operation | Operation | Comparison operation | Yes |
| right | Operand | Right-side operand | Yes |
Operand Types
PropertyOperand — references a named property:| Field | Type | Description |
|---|---|---|
type | "property" | Fixed literal |
value | string | Property name |
| Field | Type | Description |
|---|---|---|
type | "value" | Fixed literal |
value | string / number / boolean / array | The literal value |
Operation Values
| Category | Possible Values |
|---|---|
| String | "includes", "startsWith", "endsWith", "==", "!=", "===", "!==" |
| Number | ">", ">=", "<", "<=", "==", "!=", "===", "!==" |
| Array | "includes", "==", "!=", "===", "!==" |
ComplexCondition
Combines multiple simple or complex conditions:| Field | Type | Description | Required |
|---|---|---|---|
| conditions | Array of SimpleCondition or ComplexCondition | Nested conditions | Yes |
| operator | string | "AND" or "OR" | Yes |
Usage Examples
Simple String Check
Complex AND Condition
Common Use Cases
- Guard Clauses: Skip processing if data is empty or invalid
- Branching Logic: Take different parse paths based on a field value
- Conditional Sinking: Only publish to a sink when data meets a criteria
Related Commands
- Command Validation - Validate data before branching
- Filter - Filter arrays by field values