Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1708

updateToVersion unexpectedly overwrites ObjectTypeNode.expirationOffset of super type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.11.1.GA
    • 7.10.1.GA
    • BRE
    • 1
    • False
    • False
    • CR1
    • +
    • Undefined
    • 2021 Week 19-21 (from May 10), 2021 Week 22-24 (from May 31)

    Description

      For example, you have Event class and its subclass AEvent. You declare AEvent as @role( event ) with @expires

      declare AEvent
         @role( event )
         @timestamp( eventTimestamp )
         @expires(3d)
      end;
      

      You have a rule for AEvent but also a rule for the super class, Event.

      rule "detect AEvent"
      when $e: AEvent()
      then
          System.out.println("detect AEvent");
      end
      
      rule "detect Event"
      when $e: Event()
      then
         System.out.println("detect Event");
      end
      

      In this case, ObjectTypeNode are created for those classes. For Event, it's ObjectTypeNode.expirationOffset is -1 (because @expires is not defined). But when you trigger KieContainer.updateToVersion(), the ObjectTypeNode.expirationOffset is overwritten by AEvent's ObjectTypeNode.expirationOffset (= 3 day).

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-anijhawa1 Amit Nijhawan (Inactive)
              Paolo Bizzarri Paolo Bizzarri
              Paolo Bizzarri Paolo Bizzarri
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: