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

Rule with temporal operator incorrectly fires after KieSession serialization.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • 6.2.0.CR4
    • core engine
    • None

    Description

      See the following reproducer: https://github.com/DuncanDoyle/drools-serialization-temporal-operators-issue

      Clone the repo and run: 'mvn clean test'

      What I'm trying to do is, for long running CEP sessions, change the underlying KieBase after a KieSession serialisation. The use-case is that our session can hold Events for weeks, maybe months. We periodically save the session to create save points to accommodate for engine crashes (so we can reload).

      We also want to be able to add new rules to our KieBase, without invalidating the session (if we would have to load a new KieSession after we've changed our rules this, would't allow us to use long running CEP sessions, we would loose events). This seems to be possible by serializing the session, and de-serializing it with a new (updated) KieBase.

      And there is where I see strange behaviour. My first unit test works correctly, I serialize the session and de-serialize it with the same KieBase and everything works as expected. However, my second unit-tests de-serializes the KieSession with a new KieBase which has a single additional rule (rule 3). This causes my rule with temporal operator (rule 2 in my reproducer) to incorrectly fire for one of the events (event 1).

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            rhn-gps-ddoyle Duncan Doyle (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: