-
Bug
-
Resolution: Done
-
Major
-
7.12.0.GA, 7.12.1.GA
In non executable model, equality condition between BigDecimal property and numeric value does not work correctly when there are 3 or more different conditions for the same property.
For example, when we insert an object which has BigDecimal("10") as value property for rules like (*1), Rule 1 does not match in non executable model.
When the constraint in Rule 1 is value == 10B or value == new BigDecimal("10"), the issue does not occur.
(*1) Example rules
rule "Rule 1" when $fact : Fact( value == 10 ) then System.out.println("***** Action of " + kcontext.getRule().getName() + ": $fact = " + $fact); end rule "Rule 2" when $fact : Fact( value == 20 ) then System.out.println("***** Action of " + kcontext.getRule().getName() + ": $fact = " + $fact); end rule "Rule 3" when $fact : Fact( value == 30 ) then System.out.println("***** Action of " + kcontext.getRule().getName() + ": $fact = " + $fact); end
(*2) Java code
Fact fact = new Fact(); fact.setValue(new BigDecimal("10")); kSession.insert(fact); System.out.println("***** start"); kSession.fireAllRules(); System.out.println("***** end");
- incorporates
-
DROOLS-7085 Rule doesn't match with more than 3 rules of BigDecimal coercion in non executable model
- Resolved