Jochen Welle created DROOLS-1483:
------------------------------------
Summary: Support default expiration for events
Key: DROOLS-1483
URL:
https://issues.jboss.org/browse/DROOLS-1483
Project: Drools
Issue Type: Feature Request
Environment: Drools >= 6.5 in STREAM mode
Reporter: Jochen Welle
Assignee: Edson Tirelli
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.
{code:java}
@Role(Type.EVENT)
@Expires(value = "10m") // fixed expiration offset or
@Expires(value = "10m", type="fixed") // fixed expiration offset
public class MyEvent {
...
{code}
New behavior:
{code:java}
@Role(Type.EVENT)
@Expires(value = "10m", type="default") // new feature
public class MyEvent {
...
{code}
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|https://issues.jboss.org/browse/DROOLS-1227]
* [link
DROOLS-586|https://issues.jboss.org/browse/DROOLS-586]
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)