I am trying to work with EasyRules.
I have created 3 rules A, B & C with priorities 1, 2 & 3 respectively.
Even though rule A is evaluated to true and has the highest priority, rules with lower priority (i.e. B & C) are being evaluated.
How does this rule priority work?
Is there a work around where if a rule with higher priority is evaluated to true, then rules with lower priority are not evaluated?
Priority has no relation with whether a rule is executed or not. It indicates only the execution order of the rules
From the documentation :
You can also read :
If you want the engine to skip rules after a rule is applied, you should provide the engine with the param
skipOnFirstAppliedRule
set totrue
.In your case, only the
A
rule will be executed.