What is the problem - I assume the rule is not firing?

Many things can go wrong here:
   - Is Event declared properly in the DRL?
   - Is the session run properly?
   - Is the insert call correct?

In short, a full working example would be required, and the Drools version you are using.

-W


2011/6/13 Nicolás Sanchez <sancheznicolas89@gmail.com>
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




_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users