Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3260

Events with no expiration declared being set to zero expirationOffset during package assembly

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Hide

      It appears to happen whenever you have an event with subclasses and rules referencing both classes.

      Show
      It appears to happen whenever you have an event with subclasses and rules referencing both classes.

    Description

      Had a problem with events being expired immediately on being inserted. These events have no @expiration declaration. Tracing and debugging led to this line:

      ReteooRuleBase, line 477:
      node.setExpirationOffset( Math.max( node.getExpirationOffset(), typeDeclaration.getExpirationOffset()+1 ) );

      Since neither the type and its supertype have expirations declared, getExpirationOffset() returns -1 in both cases. Max(-1, -1 + 1) == 0, so the event is assigned an expiration of zero.

      Should make sure not to set the expiration when both are already -1.

      Attachments

        Activity

          People

            etirelli@redhat.com Edson Tirelli
            rcrawford42 Rob Crawford (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty