[rules-users] Problem with or condition

Ayush ayush.vatsyayan at alcatel-lucent.com
Tue Jan 25 00:55:31 EST 2011


Hi, I'm getting problem while executing rule with or condition.
My rule is like

MyEvent () from entry-point MyStream
Number($objCountForOne : doubleValue) from accumulate( MyEvent(prop1 ==
"One") over window:time(1m) from entry-point MyStream,count())
eval($objCountForOne > getMyNodeCount()*0.35)

or 

MyEvent () from entry-point MyStream
Number( $objCountForTwo : doubleValue) from accumulate( MyEvent(prop1 ==
"Two"), count())
eval($objCountForTwo >= getMyConnectionCount()*0.40)

The above rule both conditions run well when executed separately but when I
merge them using or they don't work well. When I inserted the event for 1st
condition it does not gets executed because the last eval line in 2nd
condition i.e. "eval($objCountForTwo >= getMyConnectionCount()*0.40)" is
false.

Now I have to run them like if conditions in java i.e. if(1st == true || 2nd
== true) then do my work.
Please let me know how can I solve it?
Thanks in advance.

-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Problem-with-or-condition-tp2326849p2326849.html
Sent from the Drools - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110124/ec20f5e3/attachment.html 


More information about the rules-users mailing list