count($e) rather than sum($e)

Also:
when
   accumulate( $e: MyEvent() over window:time(X m); $c: count( $e ); $c > Y )
then

-W


-W


On 15 April 2013 19:17, Mauricio Salatino <salaboy@gmail.com> wrote:
Hi Adrian,

nice to see you here, you can do something like:

Number(intValue > Y ) from accumulate ( $e: MyEvent() over window:time(x m), sum($e))




On Mon, Apr 15, 2013 at 1:26 PM, Adrián Paredes <adrianp@epidataconsulting.com> wrote:
People,

I'm new at Drools Fusion and I found a problem when I'm tryin to implement a Rule. I need to count the number of events that happened in the last X minutes, and fire the rule if the count is greater than Y.

When I use window:time(Xm), each event slide the window, and does not help. 

¿What should I do to solve my problem?

Thx in advance.
Regards.

--
Epidata Consulting | Deploying Ideas
Ing. Adrián M. Paredes | Arquitecto Desarrollador
adrianp@epidataconsulting.com | Cel: (54911) 3297 1713
----------------------------------------------------------------------------------------------------------------------------
Argentina: Maipú 521 Piso 7 | Buenos Aires | Of: (5411) 5031 0060
Chile: Apoquindo 3600 Piso 7 y 9 | Las Condes - Santiago | Of: (+56) 2 495 8450
---------------------------------------------------------------------------------------------------------------------------

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



--
 - MyJourney @ http://salaboy.com
 - Co-Founder @ http://www.jugargentina.org
 - Co-Founder @ http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -

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