Syntactical definition of constraint bindings should be added so that we can understand that constraint binding considers only the first atomic expression.
For the following pattern in LHS, some users expect that the value of $id is not id but id + 1.
Fact( $id : id + 1 )
To accomplish this, we need to enclose id + 1 with parentheses like $id : (id + 1) because id is actually bound to $id.
However, any syntactical definition/explanation on constraint binding feature except some examples [1] cannot be found in our documentation.
[1] Red Hat Decision Manager > 7.11 > Developing decision services in Red Hat Decision Manager - 16.8.2. Bound variables in patterns and constraints
https://access.redhat.com/documentation/en-us/red_hat_decision_manager/7.11/html-single/developing_decision_services_in_red_hat_decision_manager/index#bound_variables_in_patterns_and_constraints
NOTE
Ensure that you separate constraint bindings and constraint expressions for clearer and more efficient rule definitions. Although mixed bindings and expressions are supported, they can complicate patterns and affect evaluation efficiency.
// Do not use the following format:
Person( $age : age * 2 < 100 )// Use the following format instead:
Person( age * 2 < 100, $age : age )