The best way to do that would be to write the field constraints for testValue to check for exact ranges. You want, for instance  to set percent to 15 if, and only if<br><br>   Test( testValue &gt;50 &amp;&amp; &lt;= 80)<br>
<br>As an alternative, write a function percent(int tv) computing the percent value and do<br>  rule RuleX<br>  when<br>          t : Test( status == 10, $testValue : testValue )<br>  then<br>          t.percent = percent( $testValue );<br>
          modify( t );<br>  end<br><br>To have an &quot;or&quot; CE in a decision table, simply duplicate the rule (mostly by cell reference, not cut-and-paste) and replace whatever needs to be replaced in the second term of the disjunction.<br>
<br>-W<br><br><div class="gmail_quote">On Mon, Apr 20, 2009 at 5:51 AM, Manish1985 <span dir="ltr">&lt;<a href="mailto:pramanish@gmail.com">pramanish@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi All,<br>
<br>
Assume that following is the case,<br>
<br>
rule &quot;Rule1&quot;<br>
<br>
        when<br>
                t:Test(status==10)<br>
                Test(testValue &gt; 90)<br>
<br>
        then<br>
                t.percent=5;<br>
                          modify(t);<br>
<br>
end<br>
<br>
<br>
rule &quot;Rule2&quot;<br>
<br>
        when<br>
                t:Test(status==10)<br>
                Test(testValue&gt; 80)<br>
<br>
        then<br>
                t.percent=10;<br>
                          modify(t);<br>
<br>
end<br>
rule &quot;Rule3&quot;<br>
        when<br>
                t:Test(status==10)<br>
                Test(testValue  &gt; 50)<br>
        then<br>
                t.percent=15;<br>
                          modify(t);<br>
        end<br>
<br>
Here, based on each condition i will assign percentage value.<br>
Assume that testValue is 100 and status is 10 so it will be evaluated true<br>
for each rule<br>
but i dont want that. i want Rule1 to be evaluated and then it should stop<br>
executing other rules other wise percetage value will be different from what<br>
i want.<br>
(15 instead of 5).<br>
<br>
I can do this by adding one more condition in every rule like<br>
Test(percent==0)<br>
<br>
and initially i will intialize Test.percent by zero so only first Rule will<br>
be evaluated/executed.<br>
<br>
But is there any other way apart from these?<br>
<br>
One more thing is that in decision table i want to add OR between two<br>
conditions.<br>
How can i do that? please give me example for doing that.<br>
<br>
Thanks a lot in advance.<br>
<br>
Regards,<br>
Manish<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://www.nabble.com/I-want-only-first-rule-to-be-executed-even-more-than-one-rule-are-fulfilling-the-LHS-tp23080560p23080560.html" target="_blank">http://www.nabble.com/I-want-only-first-rule-to-be-executed-even-more-than-one-rule-are-fulfilling-the-LHS-tp23080560p23080560.html</a><br>

Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>