Condition
Type:
condition
• Category:flow
Description
Evaluate boolean expression
Parameters
Name | Type | Description | Required | Default |
---|---|---|---|---|
expression | string | no |
Help
Overview
The Boolean Expression Evaluator worker functions as a simple conditional processor, similar to an if
statement in most programming languages. It receives a textual boolean expression, evaluates it, and returns the resulting true/false value. This makes it useful for dynamic decision‑making within workflows where the condition is supplied at runtime.
Inputs
expression
(string) – A valid boolean expression written in standard logical syntax.- Supported operators:
&&
(AND),||
(OR),!
(NOT) - Parentheses can be used to control precedence, e.g.,
(a && b) || !c
- Operands may be literals (
true
,false
) or variables that are resolved from the worker’s execution context.
- Supported operators:
Minimal Example Usage
Assume the worker is invoked with the following input payload:
{
"expression": "(true && false) || !false"
}
When executed, worker evaluates the expression step‑by‑step:
true && false
→false
!false
→true
false || true
→true
The final output returned by the worker is:
{
"result": true
}
This concise example demonstrates how the worker can be embedded in a larger workflow to perform conditional logic without writing explicit if
statements.