Search code examples
droolscomplex-event-processingdrools-fusion

Drools Fusion time based sliding window AND attribute filtre


I try to use a sliding time window in Drools 5.4.0.Final and given the following official documentation snippets:

StockTick() over window:time( 2m )

and

StockTick( company == "RHT" ) over window:length( 10 )

I was thinking that the mixed form was valid:

StockTick( company == "RHT" ) over window:time( 2m )

But, unless I'm mistaken, it doesn't behaves as expected (i.e consider only the RHT Stock Ticks that happened in the last 2 minutes). And I didn't understand the logic of the result.

Somebody could explain me the trick please ?

Thanks.


Solution

  • Two Drools versions cause two different behaviors (same Unit Test). So I think my misunderstood comes from a bug in "windows" behavior. I can't be more specific this time.