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).
- blocks
-
DROOLS-6296 updateToVersion unexpectedly overwrites ObjectTypeNode.expirationOffset of super type
- Closed