Overview
This reference documents all available operators in the Rules engine, organized by category. Each operator includes syntax, parameters, and practical examples.Math Operations
Perform arithmetic calculations and number formatting.Basic Arithmetic
+ Addition
+ Addition
- Subtraction
- Subtraction
* Multiplication
* Multiplication
/ Division
/ Division
^ Exponentiation
^ Exponentiation
% Remainder
% Remainder
Rounding & Formatting
round - Round to nearest integer
round - Round to nearest integer
ceil - Round up
ceil - Round up
floor - Round down
floor - Round down
trunc - Truncate decimal
trunc - Truncate decimal
toFixed - Format decimal places
toFixed - Format decimal places
numberFormat - Locale formatting
numberFormat - Locale formatting
Advanced Math
min - Minimum value
min - Minimum value
max - Maximum value
max - Maximum value
log - Natural logarithm
log - Natural logarithm
baseLog - Logarithm with custom base
baseLog - Logarithm with custom base
e - Euler's number
e - Euler's number
Big Number Operations
For high-precision calculations that avoid floating-point errors.addBig - High-precision addition
addBig - High-precision addition
subtractBig - High-precision subtraction
subtractBig - High-precision subtraction
multiplyBig - High-precision multiplication
multiplyBig - High-precision multiplication
divideBig - High-precision division
divideBig - High-precision division
Comparison Operations
Compare values to make decisions.= - Equal
= - Equal
!= - Not equal
!= - Not equal
> - Greater than
> - Greater than
>= - Greater than or equal
>= - Greater than or equal
< - Less than
< - Less than
<= - Less than or equal
<= - Less than or equal
between - Value in range
between - Value in range
value- The value to checkmin- Minimum valuemax- Maximum valueinclusivity(optional) - One of:"INCLUSIVE"(default) - Both boundaries included"EXCLUSIVE"- Both boundaries excluded"INCLUSIVE_LEFT"- Only left boundary included"EXCLUSIVE_LEFT"- Only left boundary excluded"INCLUSIVE_RIGHT"- Only right boundary included"EXCLUSIVE_RIGHT"- Only right boundary excluded
notBetween - Value outside range
notBetween - Value outside range
Logic Operations
Combine conditions with boolean logic.and - Logical AND
and - Logical AND
or - Logical OR
or - Logical OR
not - Logical NOT
not - Logical NOT
empty - Check if empty
empty - Check if empty
notEmpty - Check if not empty
notEmpty - Check if not empty
String Operations
Manipulate and search text.concat - Concatenate strings
concat - Concatenate strings
join - Join with comma
join - Join with comma
substring - Extract substring
substring - Extract substring
stringTemplate - Format template
stringTemplate - Format template
split - Split string into array
split - Split string into array
startsWith - Check prefix
startsWith - Check prefix
endsWith - Check suffix
endsWith - Check suffix
stringContains - Check if contains
stringContains - Check if contains
stringNotContains - Check if doesn't contain
stringNotContains - Check if doesn't contain
regex - Pattern matching and extraction
regex - Pattern matching and extraction
string- The text to searchpattern- Regular expression pattern (use\\to escape backslashes in JSON)
\\d- Any digit (0-9)\\w- Any word character (a-z, A-Z, 0-9, _)\\s- Any whitespace.- Any character+- One or more*- Zero or more^- Start of string$- End of string()- Capture group
\\d not \d)Array Operations
Work with lists and collections.arrayContains - Check if array contains value
arrayContains - Check if array contains value
arrayNotContains - Check if array doesn't contain value
arrayNotContains - Check if array doesn't contain value
inArray - Check if value in array
inArray - Check if value in array
notInArray - Check if value not in array
notInArray - Check if value not in array
concatArray - Combine arrays
concatArray - Combine arrays
generateArray - Create array from conditions
generateArray - Create array from conditions
sort - Sort numbers and strings
sort - Sort numbers and strings
arrayFilter - Filter with boolean mask
arrayFilter - Filter with boolean mask
Set Operations
Perform mathematical set operations on arrays.isSubset - Check if subset
isSubset - Check if subset
isNotSubset - Check if not subset
isNotSubset - Check if not subset
setUnion - Union of sets
setUnion - Union of sets
setIntersection - Intersection of sets
setIntersection - Intersection of sets
setDifference - Difference of sets
setDifference - Difference of sets
Lookup & Mapping
Map values and check membership.map / lookup - Key-value mapping
map / lookup - Key-value mapping
inOptions / options-in - Check if value in options
inOptions / options-in - Check if value in options
in - General membership check
in - General membership check
notIn - General non-membership check
notIn - General non-membership check
Date Operations
Work with dates and times.today - Current date
today - Current date
now - Current datetime
now - Current datetime
timeNow - Current timestamp
timeNow - Current timestamp
addDate - Add time period
addDate - Add time period
subtractDate - Subtract time period
subtractDate - Subtract time period
dateDiff - Calculate date difference
dateDiff - Calculate date difference
dateFormat - Format date
dateFormat - Format date
toISO - Convert to ISO format
toISO - Convert to ISO format
JSON Operations
Parse and query JSON data.jsonParse - Parse JSON string
jsonParse - Parse JSON string
jsonStringify - Convert to JSON string
jsonStringify - Convert to JSON string
jPath - JSONPath query
jPath - JSONPath query
System Operations
Special system-level operations.fact - Reference another fact
fact - Reference another fact
@fact: syntax is used instead).Syntax:expression - Evaluate expression
expression - Evaluate expression