Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1235

Issue with alpha node and expired events rule execution

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 7.7.1.GA
    • 7.4.1.GA, 7.6.0.GA
    • BRE
    • 8
    • Release Notes
    • CR1
    • +
    • 2020 Week 10-12 (from Mar 2), 2020 Week 16-18 (from Apr 13)

    Description

      Alpha node based rules evaluated for expired events are not all executed during the inference cycle.

      With the following rules:

       declare DummyEvent
           @role( event )
           @timestamp( eventTimestamp )
           @expires( 1s )
       end
       rule R1
       when
           $evt : DummyEvent()
       then
       end
       rule R2
       when
          $evt : ApplicationEvent()
       then 
       end
      

      and this code to execute:

          public interface ApplicationEvent { }
          public static class DummyEvent implements ApplicationEvent {...}
      
          /* .... */
      
              final KieSession kieSession = kieBase.newKieSession( sessionConfig, null );
      
              PseudoClockScheduler clock = kieSession.getSessionClock();
              final long currentTime = clock.getCurrentTime();
              clock.advanceTime(10, TimeUnit.SECONDS);
      
              kieSession.insert(new DummyEvent(10, currentTime));
      
              kieSession.fireAllRules()
      

      then only the R1 rule is executed, not R2.

      Attachments

        Issue Links

          Activity

            People

              mfusco@redhat.com Mario Fusco
              rhn-support-mpessanh Marcell Pessanha Cruz
              Daniel Rosa Daniel Rosa
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: