[jboss-jira] [JBoss JIRA] (DROOLS-5050) Issue with alpha node and expired events rule execution

Luca Molteni (Jira) issues at jboss.org
Mon Feb 17 05:47:01 EST 2020


     [ https://issues.redhat.com/browse/DROOLS-5050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luca Molteni updated DROOLS-5050:
---------------------------------
    Story Points: 8


> Issue with alpha node and expired events rule execution
> -------------------------------------------------------
>
>                 Key: DROOLS-5050
>                 URL: https://issues.redhat.com/browse/DROOLS-5050
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 7.33.0.Final
>            Reporter: Marcell Pessanha Cruz
>            Assignee: Luca Molteni
>            Priority: Critical
>
> Alpha node based rules evaluated for expired events are not all executed during the inference cycle. 
> With the following rules:
> {noformat}
>  declare DummyEvent
>      @role( event )
>      @timestamp( eventTimestamp )
>      @expires( 1s )
>  end
>  rule R1
>  when
>      $evt : DummyEvent()
>  then
>  end
>  rule R2
>  when
>     $evt : ApplicationEvent()
>  then 
>  end
> {noformat}
> and this code to execute:
> {noformat}
>     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()
> {noformat}
> then only the *R1* rule is executed, not R2. 
> Note: the same test case passes on 7.2.0.Final and earlier versions.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list