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

@expires( -1 ) should disable Event expiration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.4.0.Beta1
    • 6.3.0.Final
    • core engine
    • None
    • Mac OS X 10.11.1, Oracle Hotspot 1.7.0_79, Drools 6.4.0-SNAPSHOT

    • Hide

      1) Clone the following Git repo: https://github.com/DuncanDoyle/drools-disable-expiration-issue
      2) Run 'mvn clean test'

      Show
      1) Clone the following Git repo: https://github.com/DuncanDoyle/drools-disable-expiration-issue 2) Run 'mvn clean test'
    • Hide

      Set the expiration of the event to a very large value (e.g. 10000d).

      Show
      Set the expiration of the event to a very large value (e.g. 10000d).
    • NEW
    • NEW

      Defining an event with @expires( -1 ) should disable event expiration. However, when configuring my event like this:

      declare SimpleEvent
          @role( event )
          @timestamp( logicalTimestamp )
          @expires( -1 )
      end
      

      and having a rule like this:

      rule "rule_1"
          when
             $s: SimpleEvent ()
             not SimpleEvent (this != $s, this after[0, 30s] $s)
          then
             System.out.println("No event within 30 seconds of this event: " + $s.getId());
      end
      

      the event is still expired and retracted from WM after 30 seconds (the expiration time inferred from the temporal constraint in the rule).

      Reproducer can be found here: https://github.com/DuncanDoyle/drools-disable-expiration-issue
      Run 'mvn clean test' to reproduce.

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

                Created:
                Updated:
                Resolved: