Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-1097

Loading Session and running rules re-executes all rules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 6.3.0.Final
    • core engine
    • None
    • NEW
    • NEW

      This is possibly directly related to: (or rather that one relates to this one)

      https://issues.jboss.org/browse/DROOLS-1093

      The situation:

      • Create a session with 2 rules. 1 Rule expires facts that are in the working memory by retracting them.
      • Add the ExpiryFact to expire some facts
      • Execute all rules -> X facts get expired
      • dispose the existing session
      • re-load the session
      • without adding more facts to the working memory, run all rules
      • The session re-executes more rules and retracts things from memory

      Now there seem to be 2 problems with this:
      1. The session does not remember what facts it expired. So it will delete more infos, that are still "somewhere". When re-loading the session from the database, we will see an NPE
      2. Surely since it already ran the rules against the Expiry fact, it should not run them again.

      I will attach a unit test ExceptionTest#testRulesAreFiredTwice with this bug.

      Let me know if this can be worked around please and/or if there are any more questions.

      Thanks,
      Artur

            mfusco@redhat.com Mario Fusco
            pandaadb Artur Kronenberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: