Hi,
I have written the next rule :
rule "Too many events in a short period of time"
dialect "mvel"
when
$user : User()
Number(intValue > 3) from accumulate($event : Event(userId == $user.id)
over window:time(1m) from entry-point Event , count($event))
then
//Java code...
end
And the events, I insert in the Event entrypoint, are 4 and have these
timestamps:
Calendar cal1 = Calendar.getInstance();
cal1.set(2010,9,23,10,30,00);
Calendar cal2 = Calendar.getInstance();
cal2.set(2010,9,23,10,30,05);
Calendar cal3 = Calendar.getInstance();
cal3.set(2010,9,23,10,30,10);
Calendar cal4 = Calendar.getInstance();
cal4.set(2010,9,23,10,30,15);
Has the rule any syntax or semantic problem, knowing that i aim to catch if
there has been more than 3 events in the last minute?
--
Nicolás Sanchez