-
Bug
-
Resolution: Unresolved
-
Major
-
5.3.0.Final, 5.4.0.Final, 5.5.0.Beta1
-
None
-
-
Workaround Exists
-
When using "window:length", some rules are activated twice, when it should be only activated once.
The uploaded example reproduces the error: we insert Transactions, which has a field "problem" inside: 1 for problem, 0 for OK. The rules calculates the percent of transactions with problems. If the percentage>=40%, raises an alarm. If it's below 40%, removes the alarm (if there's an alarm). There is a minimum of 5 transactions to trigger/rearm.
The test case simulates a raise to 40% (alarm is trigged), continues high (until 60%) and starts to fall down to 20% (alarm is removed).
Drools version 5.2.0.Final: alarm is trigged once, removed once
Drools version 5.3.0.Final: alarm is trigged once, removed twice
Drools version 5.4.0.Final: alarm is trigged once, removed twice
Drools version 5.5.0.Beta1: alarm is trigged once, removed twice
Since there's only one alarm and drools tries to remove twice, there's a NullPointerException.
NOTE: the attached zip file has code to test issue 3564 because I first though that could be a reopen issue but no, it's not the same issue (issue 3564 is resolved in 5.5.0.Beta1).
NOTE2: I don't know if it's related to issue 3201...