Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-1483

Support default expiration for events

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 7.0.0.Beta8
    • None
    • None
    • None
    • NEW
    • NEW

    Description

      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:

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            jwelle_jira Jochen Welle (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: