[jboss-jira] [JBoss JIRA] (DROOLS-983) Incorrect expiration of events when using inheritance.
Duncan Doyle (JIRA)
issues at jboss.org
Wed Nov 18 05:52:02 EST 2015
Duncan Doyle created DROOLS-983:
-----------------------------------
Summary: Incorrect expiration of events when using inheritance.
Key: DROOLS-983
URL: https://issues.jboss.org/browse/DROOLS-983
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 6.3.0.Final
Environment: Mac OS X 10.11.1, Oracle Hotspot 1.7.0_79, Drools 6.4.0-SNAPSHOT
Reporter: Duncan Doyle
Assignee: Mario Fusco
When I define 2 events with different @expires configurations (e.g. event-type-1 with 10s, the event-type-2 with 100d), and the event-type-2 is a subclass of event-type-1, the instances of event-type-2 are expired using the configuration of event-type-1.
So even though instances of event-type-2 have been configured to expire after a 100 days, they expire after 10 seconds.
What happens is that there are 2 WorkingMemoryReteExpireAction jobs scheduled for each insert, one with the scheduling of event-type-1, and one with the scheduling of event-type-2. This is probably due to the fact that the inserted event matches 2 patterns, one for event-type-1 (its superclass) and one for event-type-2 (its actual class). When the WorkingMemoryReteExpireAction with scheduling of event-type-1 runs, the event is expired.
Reproducer can be found here: https://github.com/DuncanDoyle/drools-event-expiration-issue . Just run "mvn clean test" on that project.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list