when I was testing the sliding windows, I was blocked becouse this concept
doesn't work for me, It's becouse of my misunderstanding of the concept, I
looking for the error which I do:
for exemple:
==> the rule:
*/
rule "sliding windows"
when
$a : Event1() over window:time(2s)
then
System.out.println("ok");
end /*
==> Events
Event1 ev1=new Event1((long)1000,(long)2000); // the event will occur in 1s
and finish in 3s
Event1 ev2=new Event1((long)3000,(long)4000); // the event will occur in 3s
and finish in 4s
session.insert(ev1);
session.insert(ev2);
clock.advanceTime(4, TimeUnit.SECONDS); // we are now in 4s so only event
that happen in [2s,4s] have
session.fireAllRules(); // to fire -ev2-.
// But the probleme that, it gives me 2 ok so the 2 object are fired !! I
don't inderstand why ??
--
View this message in context:
http://drools.46999.n3.nabble.com/A-problem-in-sliding-windows-tp3781402p...
Sent from the Drools: User forum mailing list archive at
Nabble.com.