Thanks Edson. That should help.<br><br><div class="gmail_quote">2010/3/9 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:ed.tirelli@gmail.com">ed.tirelli@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>   To add constraints to a fact matched by the parent rule, use &quot;from&quot; :<br><br>rule &quot;parent&quot;<br>when<br>   $var : MyFact( ... )<br>then<br>end<br><br>rule &quot;child&quot; extends &quot;parent&quot;<br>


when<br>    MyFact(...) from $var<br>then<br>end<br><br>   Regarding your other question, Drools allows you to automatically disable/enable parent rule, cancel rules in a rule group after another rule fires, etc. but what you want to do is not available declaratively. You will need to add constraints for that in a similar way to Pavel&#39;s suggestion.<br>


<br>   []s<br>   Edson<br>  <br><br><div class="gmail_quote"><div class="im">2010/3/9 Moe Alkhafaji <span dir="ltr">&lt;<a href="mailto:moe.alkhafaji@medcpu.com" target="_blank">moe.alkhafaji@medcpu.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;">
Thanks Pavel.  I was hoping for more of a transparent functionality supported by Drools than have my users add those control method calls. I am trying to make their rules as &quot;control logic&quot; blind as possible. But, I guess they would have to do that.<div>

<div></div><div class="h5"><br>


<br>Also, any idea on re-using an object from the parent rule? What is the syntax for using an object declared in the parent rule? Thanks.<div><div></div><div><br><br><div class="gmail_quote">On Tue, Mar 9, 2010 at 11:25 AM, Pavel Tavoda <span dir="ltr">&lt;<a href="mailto:pavel.tavoda@gmail.com" target="_blank">pavel.tavoda@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;">Aha, misunderstanding. Yes you can&#39;t use activation group if you want<br>
execute more children rules. However you can use fact (Status) to<br>
avoid evaluating parent rule. My suggestion:<br>
<br>
Rule DEFAULT<br>
salience -100<br>
if A and ! Status(done) then DEFAULT end<br>
<br>
Rule A<br>
if A and B then SOMETHINGB; update(Status(done)) end<br>
<br>
Rule B<br>
if A or B then SOMETHINGB; update(Status(done)) end<br>
<br>
Rule C<br>
if A or C then SOMETHINGC; update(Status(done)) end<br>
<br>
At beginning insert Status with e.g. &quot;ready&quot;. It&#39;s possible to use<br>
instead of update also insert but because you can fire more children<br>
rules it will be waste of memory.<br>
<br>
Hope this help<br>
<font color="#888888"><br>
Pavel<br>
</font><div><div></div><div>_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br><div><div></div><div>Moe Alkhafaji<br>Chief Technology Officer, MedCPU<br>Phone: (630) 290-1113<br>Email: <a href="mailto:cto@medcpu.com" target="_blank">cto@medcpu.com</a><br>


<br>This message contains information which may be confidential. Unless you are the addressee, you may not use, copy or disclose to anyone the message or any information contained in this message. If you have received this email in error, please notify <a href="mailto:cto@medcpu.com" target="_blank">cto@medcpu.com</a> and please delete the message immediately. In order for the contents of this message to be binding on behalf of MedCPU it must be confirmed in writing by an authorized signatory of MedCPU. Our company accepts no liability for the content of this email unless it is so confirmed. The views or opinions presented herein do not necessarily represent those of the company.<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></div></div></blockquote></div><br><br clear="all"><br>-- <br><div><div></div><div class="h5">  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by 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><br clear="all"><br>-- <br>Moe Alkhafaji<br>Chief Technology Officer, MedCPU<br>Phone: (630) 290-1113<br>Email: <a href="mailto:cto@medcpu.com">cto@medcpu.com</a><br><br>This message contains information which may be confidential. Unless you are the addressee, you may not use, copy or disclose to anyone the message or any information contained in this message. If you have received this email in error, please notify <a href="mailto:cto@medcpu.com">cto@medcpu.com</a> and please delete the message immediately. In order for the contents of this message to be binding on behalf of MedCPU it must be confirmed in writing by an authorized signatory of MedCPU. Our company accepts no liability for the content of this email unless it is so confirmed. The views or opinions presented herein do not necessarily represent those of the company.<br>