[rules-users] Sliding length window of (1) equals latest event?!

OlliSee o.roess at seeburger.de
Fri Jan 28 10:41:56 EST 2011


Hey again everyone,

I seem to be having another problem. 

When I have a rule like that

when
        A() over window:length(1)
        B() over window:length(1)
then
        ...

I imagine now having two windows of length 1. One always keeping the latest
A event and one always keeping the latest B event. And I expect them to
update themselves once a new event comes in.

But if I have events coming in like this...

A1, A2, B1

The rule fires for (A2, B1)

then another event B2 is coming in and it fires for (A2,B2)
So far so good.

Then another event A3 is coming in and the rule fires for (A3,B2) and
(A3,B1).
Why? Shouldn't the B window only have B2 inside since it arrived and thus
fire only for (A3,B2)?

I have already been searching for this problem, found this
http://drools-java-rules-engine.46999.n3.nabble.com/DROOLS-problem-with-sliding-windows-td2039892.html
but I'm not sure if this is the same problem as mine.

Helping me understand this is highly appreciated, since I thought I had
completely understood the window behaviour.

Thanks in advance.
Kind regards
Oliver
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Sliding-length-window-of-1-equals-latest-event-tp2366946p2366946.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list