[jboss-jira] [JBoss JIRA] (DROOLS-5050) Issue with alpha node and expired events rule execution
Mario Fusco (Jira)
issues at jboss.org
Mon Mar 9 05:00:02 EDT 2020
[ https://issues.redhat.com/browse/DROOLS-5050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco reassigned DROOLS-5050:
-----------------------------------
Assignee: Mario Fusco (was: Luca Molteni)
> 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: Mario Fusco
> 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