Logic node expressions and syntax
Expression fundamentals
The Logic node uses the Navixy IoT Logic Expression Language, which is based on Java Expression Language (JEXL). All expressions must return a boolean value (true/false) for proper node operation.
Expression evaluation: Expressions are evaluated from left to right, and you can use parentheses to control the order of operations.
Basic syntax example:
condition1 && (condition2 || condition3 > condition4)
Available operators
Comparison operators
Operator | Description |
---|---|
| Checks if two operands are equal. If operands are of different types, JEXL converts them to one if possible |
| Checks for inequality of two operands. Returns true if operands are not equal |
| Checks that the left operand is smaller than the right operand |
| Checks that the left operand is smaller or equal to the right operand |
| Checks that the left operand is larger than the right operand |
| Checks that the left operand is larger or equal to the right operand |
Logical operators
Operator | Description |
---|---|
| Logical AND - checks if two conditions are true. Returns true if both conditions are true |
| Logical OR - checking for the truth of at least one of the two conditions |
| Logical NOT - converts the result of the condition to the opposite value |
Pattern matching operators
Operator | Description |
---|---|
| Checks if the value of the left operand is in the set of the right operand. For strings, checks for regex pattern match |
| Checks if the value of the left operand is not in the set of the right operand. For strings, checks for regex pattern mismatch |
| Checks that the left string operand starts with the right string operand |
| Checks that the left string operand doesn't start with the right string operand |
| Checks that the left string operand ends with the right string operand |
| Checks that the left string operand doesn't end with the right string operand |
Expression examples
Error handling scenarios
Scenario | Result | Flow Path | Attribute Value |
---|---|---|---|
Expression evaluates to | Success | THEN connection |
|
Expression evaluates to | Success | ELSE connection |
|
Referenced attribute is | Treated as | ELSE connection |
|
Syntax error in expression | Treated as | ELSE connection |
|
Referenced attribute doesn't exist | Treated as | ELSE connection |
|