[
https://issues.jboss.org/browse/DROOLS-997?page=com.atlassian.jira.plugin...
]
Chris Pitman commented on DROOLS-997:
-------------------------------------
Why should an expired event be evaluated "at least once"? This goes against the
declarative nature of the rules. If I declare an event, and I also declare that an event
should only be active for two hours after the time it occurs, then it is extremely
*surprising* when a 3 hour old event is processed.
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)