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
==
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
&& or and
Logical AND - checks if two conditions are true. Returns true if both conditions are true
| or or
Logical OR - checking for the truth of at least one of the two conditions
! or not
Logical NOT - converts the result of the condition to the opposite value
Pattern matching operators
=~
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
Expression evaluates to true
Success
THEN connection
true
Expression evaluates to false
Success
ELSE connection
false
Referenced attribute is null
Treated as false
ELSE connection
false
Syntax error in expression
Treated as false
ELSE connection
null
Referenced attribute doesn't exist
Treated as false
ELSE connection
null
Practical implementation examples
Last updated
Was this helpful?