Usually the result of an accumulate is tested right there in the pattern matching that object: ... Number($i1 : doubleValue > (getNodeCount()*0.35) ) from accumulate(...
Hopefully, getNodeCount() is a DRL function or an imported static method. -W On 27 January 2011 14:21, Ayush <ayush.vatsya...@alcatel-lucent.com> wrote: > > Hi All, > > When I'm trying to execute multiple evals I'm getting errors. Below is what > I'm trying to do > > MyEvent(prop1="XYZ") over window:time(1m) from entry-point > MyStream > or > (MyEvent() over window:time(1m) from entry-point MyStream > and > Number($i1 : doubleValue) > from accumulate( > MyEvent( > prop1 == "CONNECT", > prop2 == 3, > eval((prop3 matches ("match "+getFirstNameRegex()+" > Connect")) == true) > ) over window:time(1m) from entry-point MyStream, > count() > ) > and > eval($i1 > getNodeCount()*0.35)) > or > (MyEvent() over window:time(1m) from entry-point MyStream > and > Number($i2 : doubleValue) > from accumulate( > MyEvent( > prop1 matches "(second|Third{1}_CONNECT", > prop2 == 1, > eval((prop3 matches > ("MatchOne|MatchTwo){1}::"+getMMSCNameRegex()+", > failure")) == true) > ) over window:time(1m) from entry-point MyStream, > count() > ) > and > eval($i2 > getConnectionCount()*0.4)) > or > (MyEvent() over window:time(1m) from entry-point MyStream > and > Number($i3 : doubleValue) > from accumulate( > MyEvent( > prop1 matches "(E1|E2){1}_CONNECT", > prop2 == 3, > eval((prop3 matches ("REPT (one|five|seven){1}:: > "+getServerID()+" is > down")) == true) > ) over window:time(1m) from entry-point MyStream, > count() > ) > and > eval($i3 > getThirdNodeCount()*0.5)) > > When I'm trying to execute the above LHS I get > org.drools.rule.InvalidPatternException: Required Declarations not bound: > '$i1'. > > Please help it's urgent > -- > View this message in context: > http://drools-java-rules-engine.46999.n3.nabble.com/Error-using-multiple-evals-tp2362605p2362605.html > Sent from the Drools - User 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