Setting simple priorities among rules
Rules have priorities, which can be static or dynamic. Use a constant to define a static priority, or an expression containing a ruleset variable to define a dynamic priority.
Static priority
Use a static priority to change the sequence of rule execution among rules. Static priorities are integers, the relative values of which determine the priorities among the rules. You can also use a static priority to change the order of execution between several instances of the same rule when they are eligible for execution at the same time.
You define static priorities using a constant. In the Value field of the priority property, you type a number that represents the priority. The number can be any Java™ integer value between -109 and +109 . The larger the number, the higher the execution priority of the rule.
Dynamic priority
In the Value field of the priority property, you enter an expression that uses a ruleset variable. The expression can use any variables defined in the condition part of the rule provided that its scope is for the entire ruleset. If the expression returns a number that is not an integer, it is converted to an integer following the Java language specification.
prior1 + ?p
-?a