-
Bug
-
Resolution: Done
-
Major
-
7.13.4.GA
-
False
-
None
-
False
-
-
-
-
-
-
-
-
-
2023 Week 36-38 (from Sep 4)
With the rule
package com.example.reproducer; dialect "mvel" rule "Rule 1" when $definition : Definition( $value1 : value1, $value2 : value2 ) exists Fact( $value1 == value1, $value2 == value2 ) then System.out.println("***** " + drools.getRule().getName() + ": $definition=" + $definition); end rule "Rule 2" when $definition : Definition( $value1 : value1, $value2 : value2 ) not Fact( $value1 == value1, $value2 == value2 ) then System.out.println("***** " + drools.getRule().getName() + ": $definition=" + $definition); end
inserting objects like:
Definition def2 = new Definition(); def2.setValue1("9999"); def2.setValue2("567"); kSession.insert(def2); Fact fact2 = new Fact(); fact2.setValue1(new BigDecimal("9009")); fact2.setValue2(new BigDecimal("567")); kSession.insert(fact2);
fires "Rule 1" (instead of "Rule 2") although def2.value1 and fact2.value1 are different.
Note that Definition.value1 and value2 are both String. Fact.value1 and value2 are both BigDecimal.
This happens in both exec-model and non-exec-model