Condition Operators
Comparison Operators
Section titled “Comparison Operators”Equal (eq)
Section titled “Equal (eq)”{ "condition": { "operator": "eq", "left": { "contextPath": "status" }, "right": "ready" }}Works with strings, numbers, booleans.
Not Equal (neq)
Section titled “Not Equal (neq)”{ "condition": { "operator": "neq", "left": { "contextPath": "error_count" }, "right": 0 }}Greater Than (gt)
Section titled “Greater Than (gt)”{ "condition": { "operator": "gt", "left": { "contextPath": "score" }, "right": 80 }}Greater Than or Equal (gte)
Section titled “Greater Than or Equal (gte)”{ "condition": { "operator": "gte", "left": { "contextPath": "items_count" }, "right": 1 }}Less Than (lt)
Section titled “Less Than (lt)”{ "condition": { "operator": "lt", "left": { "contextPath": "retry_count" }, "right": 3 }}Less Than or Equal (lte)
Section titled “Less Than or Equal (lte)”{ "condition": { "operator": "lte", "left": { "contextPath": "error_rate" }, "right": 0.05 }}String Operators
Section titled “String Operators”Contains (contains)
Section titled “Contains (contains)”{ "condition": { "operator": "contains", "left": { "contextPath": "message" }, "right": "error" }}Also works with arrays:
{ "condition": { "operator": "contains", "left": { "contextPath": "tags" }, "right": "urgent" }}Existence Operators
Section titled “Existence Operators”Exists (exists)
Section titled “Exists (exists)”{ "condition": { "operator": "exists", "operand": { "contextPath": "optional_field" } }}Returns true if variable exists and is not null/undefined.
Is Empty (isEmpty)
Section titled “Is Empty (isEmpty)”{ "condition": { "operator": "isEmpty", "operand": { "contextPath": "items" } }}Returns true for:
- Empty string
"" - Empty array
[] - Null/undefined
Logical Operators
Section titled “Logical Operators”AND (and)
Section titled “AND (and)”All conditions must be true:
{ "condition": { "operator": "and", "conditions": [ { "operator": "eq", "left": { "contextPath": "status" }, "right": "complete" }, { "operator": "gt", "left": { "contextPath": "score" }, "right": 80 } ] }}OR (or)
Section titled “OR (or)”At least one condition must be true:
{ "condition": { "operator": "or", "conditions": [ { "operator": "eq", "left": { "contextPath": "priority" }, "right": "high" }, { "operator": "eq", "left": { "contextPath": "priority" }, "right": "critical" } ] }}NOT (not)
Section titled “NOT (not)”Negates a condition:
{ "condition": { "operator": "not", "condition": { "operator": "eq", "left": { "contextPath": "status" }, "right": "blocked" } }}Context Path Syntax
Section titled “Context Path Syntax”Simple Path
Section titled “Simple Path”{ "contextPath": "variable_name" }Nested Path
Section titled “Nested Path”{ "contextPath": "user.profile.name" }Array Index
Section titled “Array Index”{ "contextPath": "items[0]" }Combined
Section titled “Combined”{ "contextPath": "results[0].score" }Literal Values
Section titled “Literal Values”Right-hand values can be literals:
{ "right": "string value"}{ "right": 42}{ "right": true}{ "right": null}Common Patterns
Section titled “Common Patterns”Check Boolean Flag
Section titled “Check Boolean Flag”{ "condition": { "operator": "eq", "left": { "contextPath": "has_tests" }, "right": "yes" }}Check Iteration Limit
Section titled “Check Iteration Limit”{ "condition": { "operator": "lt", "left": { "contextPath": "current_iteration" }, "right": 5 }}Check Non-Empty Result
Section titled “Check Non-Empty Result”{ "condition": { "operator": "and", "conditions": [ { "operator": "exists", "operand": { "contextPath": "result" } }, { "operator": "not", "condition": { "operator": "isEmpty", "operand": { "contextPath": "result" } } } ] }}See Also
Section titled “See Also”- Workflow Templates - Using conditions in workflows
- Validation - Input validation rules