-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
NEW
-
NEW
We would like to be able to specify a "default" expiration offset for events. The default expiration offset should be used if the inferred expiration offset is infinite.
Benefits would be:
- Expiration is guaranteed: either after the specified offset or after the inferred offset.
- Rule authors are not required to include a temporal constraint in all rules.
- Event classes can be designed if the rules are not yet known.
The current behavior of @Expires (fixed expiration offset) could be the default and an optional attribute could be added to enable the new behavior.
@Role(Type.EVENT) @Expires(value = "10m") // fixed expiration offset or @Expires(value = "10m", type="fixed") // fixed expiration offset public class MyEvent { ...
New behavior:
@Role(Type.EVENT) @Expires(value = "10m", type="default") // new feature public class MyEvent { ...
The goal is to have automatic event lifetime/memory management at all times. At the moment either a fixed expiration offset has to be set, which is only possible after analysing all rules and determining the expiration offset manually. Or every rule must include some temporal constraint, which is sometimes a tough burden on the rule author.
This feature is related to:
- link DROOLS-1227 I think the new behavior would touch the same code as the fix implemented there by mfusco
- link DROOLS-586