Yes, looks like this will help.<br><br><div class="gmail_quote">2009/4/21 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com">tirelli@post.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>    Define the expression &quot;check for&quot;. :)<br><br>    When working with Rete rules engines, all rules conditions are *evaluated* at fact insertion time. But the consequences are executed at rule fire time. So, does not matter if you use activation groups or not, all your 10 rule conditions will be evaluated the moment your facts are inserted into the working memory. <br>

<br>    Now, if you use the same activation group for all 10 rules and rule 3 fires, it immediately cancels any other possible activations of rules 4 to 10 and they obviously will not fire. So, the end result is that only rule 3 was executed, that I thought was your goal.<br>

<br>    There is no &quot;flag&quot;, as you mentioned, that can prevent the rule&#39;s LHS evaluation, although a control fact can be used to prevent beta matchings.<div><div></div><div class="h5"><br><br>    []s<br>    Edson<br>
  <br><br><div class="gmail_quote">
2009/4/21 Lindy hagan <span dir="ltr">&lt;<a href="mailto:lindyhagan@gmail.com" target="_blank">lindyhagan@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;">

nope, I am not looking for that. <br><br>This is my requirement: If I have 10 rules say from rule 1 to rule 10. If rule 3 is satisfied, should not check for rule 4 to rule 10.<br><br>We cannot achieve the above scenario using &quot;activation-groups&quot;.<br>


<br><div class="gmail_quote">2009/4/21 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>&gt;</span><div><div></div><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<br>   Lindy,<div><br><br>&quot;my understanding is that  if  you have 10 rules under same activation
group always the one with high salience will fire ignoring other rules.
(correct me if i am wrong.)&quot;<br><br></div>   The rule with the highest salience ***that matches (i.e., in your words: is satisfied)*** will be fired and the others will be canceled, so I guess that is exactly what you are looking for.<br>



<br>    If I misunderstood your case, please explain it further.<br><br>    []s<br>    Edson<br><br><div class="gmail_quote">2009/4/21 Lindy hagan <span dir="ltr">&lt;<a href="mailto:lindyhagan@gmail.com" target="_blank">lindyhagan@gmail.com</a>&gt;</span><div>


<div></div><div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I don&#39;t know much about drools, am still evaluating drools, we have a similar scenario that as soon as a rule is satisfied, should not check for other rules.<br>



<br>looking at the manual for activation-group , my understanding is that  if  you have 10 rules under same activation group always the one with high salience will fire ignoring other rules. (correct me if i am wrong.)<br>




<br>Probably we need to set some flag to check whether the previous rule is processed or not.<br><h1></h1><br><div class="gmail_quote"><div>2009/4/20 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>&gt;</span><br>




</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><div><div></div><div>   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" target="_blank">pramanish@gmail.com</a>&gt;</span><div><div></div><div><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" target="_blank">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></div></div><font color="#888888"><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" target="_blank">www.jboss.com</a><br>





</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></div></div></blockquote></div><br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></blockquote></div></div></div><div><div></div><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" target="_blank">www.jboss.com</a><br>



</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></blockquote></div></div></div><br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></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" target="_blank">www.jboss.com</a><br>
</div></div><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>
<br></blockquote></div><br>