Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3662

Rule activation error using length sliding window

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 6.0.0.Alpha1
    • 5.3.0.Final, 5.4.0.Final, 5.5.0.Beta1
    • drools-core
    • None
    • Hide

      Change "pom.xml" with the desired version of Drools to test.
      Run "$ mvn test -Dtest=JBRules_NewTest"

      If there is a NullPointerException, then the error exists. If not, there's no error.

      Show
      Change "pom.xml" with the desired version of Drools to test. Run "$ mvn test -Dtest=JBRules_NewTest" If there is a NullPointerException, then the error exists. If not, there's no error.
    • Workaround Exists
    • Hide

      Use Drools 5.2.0.Final

      Show
      Use Drools 5.2.0.Final

    Description

      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...

      Attachments

        Activity

          People

            mproctor@redhat.com Mark Proctor
            vitor.mendonca Vítor Moreira (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Archived:

              PagerDuty