<br>   Take a look at the manual on &quot;activation-group&quot;s. They allow you to do that.<br><br>   Also, you can call fireAllRules(1) to fire only one rule, in case your whole rulebase is like that.<br><br>   []s<br>    Edson<br>
<br><div class="gmail_quote">2009/4/19 Manish1985 <span dir="ltr">&lt;<a href="mailto:pramanish@gmail.com">pramanish@gmail.com</a>&gt;</span><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><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>