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.
- is caused by
-
DROOLS-5050 Issue with alpha node and expired events rule execution
- Closed