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 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 rule when there > are > *less* elements than X (window length) the accumulation function is still > calculated which leads to wrong results. > Is there a way in Drools to restrict firing of this type of rules when > there > are less than 'length' elements in the session? > Thanks > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Evaluation-of-the-of-rules-with-window-length-event-windows-tp3996829.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users