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

Rule delayed although temporal operator within not() refers to past events

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 6.0.0.Alpha1
    • 5.1.1.FINAL
    • None
    • None

      The .drl:

      declare Leave
      @role( event )
      @timestamp( timestamp )
      end

      rule "XXX Leave not !="
      when
      $leave: Leave()
      not Leave( this != $leave )
      then
      System.out.println( "XXX only one Leave - not !=" );
      end

      rule "YYY Leave not after"
      when
      $leave: Leave()
      not Leave( this before $leave )
      then
      System.out.println( "YYY only one Leave - not before" );
      end

      A) The pseudo-clock is advanced according to the timestamp; then
      exactly one event Leave is inserted; then fireAllRules() is called.

      1) Running in CLOUD mode, both rules fire.
      2) But running in STREAM mode, ONLY rule XXX fires.

      B) Like A, but the session clock is advanced by (at least) 1ms
      prior to calling fireAllRules().

      3) Either mode, both rules fire.

      I think that A2) is incorrect; why should passing another msec change the logic? Rule YYY matches by looking into the past, so the "rule activation delay" described in 2.5.2.2. Negative Patterns in Stream Mode should not apply because the default parameter for before is [1ms,...].

            etirelli@redhat.com Edson Tirelli
            laune Wolfgang Laun (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Archived: