See below.
On 23/08/2012, senyatur <senya.touretski(a)emc.com> wrote:
Hi everyone
We are having rules using drools fusion, sliding windows and accumulation
functions.
Example:
when
Number($count1 : longValue , longValue >= $parameter) from accumulate(
TestingClass($status : status , a=5, b=6) over window:length( 7 ) from
entry-point "EntryPoint" , count($status) )
then
// some java code...
What happens is that only objects of type TestingClass with a=5 and b=6 are
inserted into the window.
What we are trying to achieve is count how many TestingClass objects of
*any
last 7* TestingClass objects meet the condition (a=5,b=6).
This obviously isn't met because the window contains only objects meeting
the condition.
Is there a way to put a condition on the *count* function and not on
*window*?
Not quite, since you'll have to add, not count.
... , $a: a, $b: b) .., sum($a==5 && $b ==6 ? 1 : 0) )
-W
Thanks!
--
View this message in context:
http://drools.46999.n3.nabble.com/Conditions-on-the-accumulation-function...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users