-
Bug
-
Resolution: Unresolved
-
Major
-
5.4.0.Final, 5.5.0.Beta1, 5.5.0.CR1
-
None
Consider the following DRL (taken from the CepEspTest integration test, the only modification is commenting out the @expires declaration):
test_CEP_collectWithWindows.drl
package org.drools; import java.util.List global List timeResults; global List lengthResults; declare OrderEvent @role( event ) //@expires( 2m ) end rule "collect with time window" when $list : List( empty == false ) from collect( $o : OrderEvent() over window:time(30s) ) then timeResults.add( $list.size() ); end rule "collect with length window" when $list : List( empty == false ) from collect( $o : OrderEvent() over window:length(3) ) then lengthResults.add( $list.size() ); end
When you insert more than 3 events and advance pseudo clock time such that an event in the length window expires, a NPE at org.drools.rule.SlidingLengthWindow.assertFact(SlidingLengthWindow.java:115) is thrown. See the attachment for complete stack trace.
The original test with the @expires declaration uncommented passes.
The problem seems not to be present in Drools 5.3.3.Final.