[jboss-jira] [JBoss JIRA] (DROOLS-1483) Support default expiration for events

Mario Fusco (JIRA) issues at jboss.org
Thu Mar 23 12:37:00 EDT 2017


    [ https://issues.jboss.org/browse/DROOLS-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13383184#comment-13383184 ] 

Mario Fusco commented on DROOLS-1483:
-------------------------------------

Documented by https://github.com/kiegroup/kie-docs/commit/89fddc9d16a3a0f2183a05200b6cd9916d43f505

> 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: Mario Fusco
>             Fix For: 7.0.0.Beta8
>
>
> 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] I think the new behavior would touch the same code as the fix implemented there by [~mfusco]
> * [link DROOLS-586|https://issues.jboss.org/browse/DROOLS-586]



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list