[jboss-jira] [JBoss JIRA] (JBRULES-3662) Rule activation error using length sliding window

Vítor Moreira (JIRA) jira-events at lists.jboss.org
Thu Oct 18 13:13:07 EDT 2012


Vítor Moreira created JBRULES-3662:
--------------------------------------

             Summary: Rule activation error using length sliding window
                 Key: JBRULES-3662
                 URL: https://issues.jboss.org/browse/JBRULES-3662
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-core
    Affects Versions: 5.5.0.Beta1, 5.4.0.Final, 5.3.0.Final
         Environment: Mac OS X, running Apple Java 1.6, Maven2, Eclipse Juno 
            Reporter: Vítor Moreira
            Assignee: Mark Proctor


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.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jboss-jira mailing list