Doesn't accumulate have a count by itself? I guess I am trying to figure out
if it is possible to do something like:
rule "Raise alarm"
when
Number( intValue> 5) from
accumulate( $a:EventA( $id:id )
EventB(eventAId=$id, this after [0s,5s] $a);
count($a) )
then
//do stuff
end
laune wrote
An accumulate with explicitly coded init/action/result lets you
accumulate
into
a custom object that provides exactly the information you want: just
that there is a matching number of As and Bs, the counts for As and
Bs, two lists with As and Bs - anything.
See the Expert doc - there's an example for this sort of thing.
-W
On 03/10/2012, gboro54 <
gboro54@
> wrote:
> We are using expert and fusion to monitor connection events in our
> system.
> We
> would like to know the most efficient way to know that X number pair of
> events have happened in a certain example(i.e eventA and eventB occurred
> 4
> times each in the 5 seconds). What is the most efficient way to do this?
> I
> don't believe an accumulate would allow a combination of objects but I
> may
> be wrong. Perhaps a live query invoked by a rule?
>
>
>
> --
> View this message in context:
>
http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp40...
> Sent from the Drools: User forum mailing list archive at
Nabble.com.
> _______________________________________________
> rules-users mailing list
>
rules-users@.jboss
>
_______________________________________________
rules-users mailing list
rules-users@.jboss
--
View this message in context:
http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp40...
Sent from the Drools: User forum mailing list archive at
Nabble.com.