Details
-
Bug
-
Resolution: Done
-
Major
-
6.3.0.Final
-
None
-
-
NEW
-
NEW
Description
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.