<br>&nbsp;&nbsp; Agenda groups control only the firing of the rules, not the evaluation. All the evaluation is eagerly executed as usual in Rete algorithm.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2008/2/5, Jai Vasanth &lt;<a href="mailto:jaivasanth@gmail.com">jaivasanth@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>&nbsp; I am using agenda groups to&nbsp; pick sets of rules to fire based on an attribute value. The presence or absence of other attributes&nbsp; is dependent on the value of this attribute based on which I select&nbsp; a particular agenda group.<br>

<br>Here is an example<br><br>rule &quot;ABC&quot;<br>&nbsp; when&nbsp; <br>&nbsp;&nbsp;&nbsp; Shape( type = &quot;rectangle&quot; )<br>&nbsp; then <br>&nbsp;&nbsp;&nbsp; drools.setFocus(&quot;twodimensional&quot;)<br>end<br><br><br>rule &quot;PQR&quot;<br>
&nbsp; when&nbsp; <br>
&nbsp;&nbsp;&nbsp; Shape( type = &quot;cube&quot; )<br>
&nbsp; then <br>
&nbsp;&nbsp;&nbsp; drools.setFocus(&quot;threedimensional&quot;)<br>
end<br><br>rule &quot;area threshold&quot;<br>agenda-group &quot;twodimensional&quot;<br>&nbsp; when&nbsp; <br>&nbsp;&nbsp;&nbsp; Shape( area &gt; 20 )<br>&nbsp; then&nbsp; <br>&nbsp;&nbsp;&nbsp; System.out.println (&quot;large object&quot; );<br>end<br>&nbsp;<br>rule &quot;volume threshold&quot;<br>


agenda-group &quot;threedimensional&quot;<br>
&nbsp; when&nbsp; <br>
&nbsp;&nbsp;&nbsp; Shape( volume &gt; 20 )<br>
&nbsp; then&nbsp; <br>
&nbsp;&nbsp;&nbsp; System.out.println (&quot;large object&quot; );<br>
end<br>
&nbsp; <br><br>Suppose if my shape object is a rectangle, then it wouldnt have the volume attribute. In this case when we try to run these rules it would throw a&nbsp; NoSuchElementException.<br><br>Is there a way to avoid this? Agenda groups help us fire the RHSs conditionally, Is there a way by which I can conditionally fire LHS of certain sets of rules ?<br>

<br><br>Thanks <br><span class="sg"><br><br>Jai <br> 
</span><br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" 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>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;JBoss Drools Core Development<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>