[jboss-jira] [JBoss JIRA] (DROOLS-997) Events that have already expired when inserted may trigger rules before expiring
Mario Fusco (JIRA)
issues at jboss.org
Mon Jan 25 08:18:00 EST 2016
[ https://issues.jboss.org/browse/DROOLS-997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco resolved DROOLS-997.
--------------------------------
Resolution: Rejected
This is the expected behaviour since events have only to be evaluated at least once by the rule engine even if they're already expired at their insertion time.
> Events that have already expired when inserted may trigger rules before expiring
> --------------------------------------------------------------------------------
>
> Key: DROOLS-997
> URL: https://issues.jboss.org/browse/DROOLS-997
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.1.0.Final
> Environment: BRMS CEP 6.1.3 GA
> Reporter: Chris Pitman
> Assignee: Mario Fusco
> Labels: fusion
>
> Events that have already expired when they are inserted have their expiration times changed to the insertion time, which will not expire until the clock ticks at least once.
> Isee the following in `drools-core/src/main/java/org/drools/core/phreak/PropagationEntry.java`:
> {code:java}
> long effectiveEnd = eventFactHandle.getEndTimestamp() + expirationOffset;
> long nextTimestamp = Math.max( insertionTime,
> effectiveEnd >= 0 ? effectiveEnd : Long.MAX_VALUE );
> if (nextTimestamp < workingMemory.getTimerService().getCurrentTime())
> {code}
> So if current time is still insertion time, the event is not expired.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list