Skip to main content

The Evaluation Flow

When you call evaluateExpr(), four things happen: Let’s trace through this example:

Step 1: Parse the Rule

Engine reads the rule and finds the operator. The first key of the object is always the operator name.

Step 2: Resolve Paths

For each argument, engine extracts values from your data.

Step 3: Execute Operator

With resolved values, operator runs its logic.

Step 4: Return Result

Engine returns a result object:

Caching

Engine caches results for speed. Same rule + same data = instant return.

Stateful Evaluation

StatefulRuleEngine adds state tracking on top:

Error Recovery Flow

When errors happen, recovery kicks in:

What’s Next?

Internals

Deep dive into source code

Operators

All 20+ operators explained