Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
7.35.0.Final, 7.36.0.Final, 7.37.0.Final, 7.38.0.Final, 7.39.0.Final, 7.40.0.Final, 7.41.0.Final, 7.42.0.Final, 7.43.0.Final, 7.43.1.Final, 7.44.0.Final, 7.45.0.Final
-
None
-
2020 Week 46-48 (from Nov 9)
-
-
Undefined
-
NEW
-
NEW
-
---
-
---
Description
Let's consider next rules example:
declare Input1 value : int end declare Input2 value : int end rule "Init Rule" lock-on-active when then Input1 input1 = new Input1(); Input2 input2 = new Input2(); input1.setValue(5); input2.setValue(10); insert(input1); insert(input2); end rule "Run Rule" when $input1: Input1() $input2: Input2( !($input1.value <= value) ) then System.out.println("Errorneous rule execution!!!");
In this code:
- 2 inputs are created and initialized by the first rule.
- The second rule must fire only when condition !($input1.value <= value) evaluates to true.
- According to the values set, condition !($input1.value <= value) evaluates always to false, so second rule should never been executed.
But if this rule is tested with Drools version >= 7.35.0.Final, this rule is executed (it is possible to see a message in the logs). With lower Drools versions - everything works correctly.