Hi guys
We are using Drools for event processing. So we have rules that, for
instance, put accumulation function over window of number of elements (not
time).
... from accumulate(Class1($a:a) over window:length(X) from entry-point
Point...
The problem we are experiencing that when evaluating the
Accumulate the count of elements (in addition to whatever you
accumulate) and test the result as being == X. As of (IIRC) 5.3.0, you
can write multi-function accumulates.
-W
On 16/05/2012, senyatur senya.touret...@emc.com wrote:
Hi guys
We are using Drools for event processing. So we have rules
...@gmail.com
À: Rules Users List rules-users@lists.jboss.org
Envoyé: Mercredi 16 Mai 2012 13:02:46
Objet: Re: [rules-users] Evaluation of the of rules with 'window:length' event
windows
Accumulate the count of elements (in addition to whatever you
accumulate) and test the result as being == X
On 16/05/2012, Vincent LEGENDRE vincent.legen...@eurodecision.com wrote:
Seems that there is a confusion here ...
window:length(X) is constraining the events timestamps to be in a
time-windows of length X (in seconds).
Definitely not. It's window:time that restricts by a time interval.
On 16/05/2012, Vincent LEGENDRE vincent.legen...@eurodecision.com wrote:
Seems that there is a confusion here ...
window:length(X) is constraining the events timestamps to be in a
time-windows of length X (in seconds).
Definitely not. It's window:time that restricts by a time interval.
oups
On 16/05/2012, Vincent LEGENDRE vincent.legen...@eurodecision.com wrote:
accumulate( Whatever(...), $count: count(1), ... )
eval( $count == X )
strange construction ...
$count: count(1) is part of the pattern ? then automatically incremented
in $count variable ?
Does the accumulate
ok, got it.
not a strange construction, but a beautiful one !!
thx
- Mail original -
If you want to have a list, you can have it in addition to count:
accumulate( $w: Whatever(...) from window:length( 10 ),
$count: count(1), $list: collectList( $w ),... )