<div>Thanks, however I am still not sure how that reuses a certain rule. Or are you saying I can write another rule just like &quot;pay validation&quot; where:</div>
<div>&nbsp;</div>
<div>rule &quot;do something&quot;<br>no-loop true<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ## Some Rule Matching&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drools.setFocus(&quot;rule test 1&quot;);<br>end<br>&nbsp;</div>
<div>.... and that&#39;s how I obtain the reuse of &quot;rule test 1&quot;?</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Roger</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 7/25/08, <b class="gmail_sendername">Vanina Beraudo</b> &lt;<a href="mailto:vaninaberaudo@gmail.com">vaninaberaudo@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Itīs a simple example, I have a rule and it call others two rules.<br>I hope help you.<br><br>rule &quot;rule test 1&quot;<br>
no-loop true<br>agenda-group &quot;rule test 1&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $p:Pay($fields:fields)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval((Double)$fields.get(&quot;amount&quot;) &lt; 100)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println( &quot;The amount should be&nbsp;&nbsp;&gt; 100&quot; );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end<br><br><br>rule &quot;rule test 2&quot;<br>no-loop true<br>agenda-group &quot;rule test 2&quot;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $p:Pay($fields:fields)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval((Double)$fields.get(&quot;amount&quot;)&gt; 200)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println( &quot;The amount should be &lt; 200&quot; );<br>end<br><br><br>rule &quot;pay validation&quot;<br>no-loop true<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $p:Pay($fields:fields)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval((Double)$fields.get(&quot;amount&quot;)&gt; 0)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drools.setFocus(&quot;rule test 1&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drools.setFocus(&quot;rule test 2&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println( &quot;The amount should be in the rank [100-200] &quot;);<br>
end<br><br><br><br><br>2008/7/25 Roger Tanuatmadja &lt;<a href="mailto:rogerst@gmail.com">rogerst@gmail.com</a>&gt;:<br>&gt; Hi ideally yes, because it makes it easy to show our business users what&#39;s<br>&gt; going on as opposed to having to decipher the flow based on some attributes,<br>
&gt; BUT I am happy to see examples of the use of Agenda as well so if you can<br>&gt; provide one that would be great.<br>&gt;<br>&gt; Thanks again,<br>&gt;<br>&gt; Roger<br>&gt;<br>&gt;<br>&gt; On 7/25/08, Vanina Beraudo &lt;<a href="mailto:vaninaberaudo@gmail.com">vaninaberaudo@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>&gt;&gt; You are right I donīt use rule flow editor, Do you need work with rule<br>&gt;&gt; flow editor?<br>&gt;&gt;<br>&gt;&gt; 2008/7/25 Roger Tanuatmadja &lt;<a href="mailto:rogerst@gmail.com">rogerst@gmail.com</a>&gt;:<br>
&gt;&gt; &gt; Hi,<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Thanks for answering, but that kinda defeats the idea of rule flows<br>&gt;&gt; &gt; doesn&#39;t<br>&gt;&gt; &gt; it? I am assuming with Agenda you don&#39;t get to use the rule flow editor?<br>
&gt;&gt; &gt;<br>&gt;&gt; &gt; Thanks, and an example would be awesome!!<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Roger<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; On 7/25/08, Vanina Beraudo &lt;<a href="mailto:vaninaberaudo@gmail.com">vaninaberaudo@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Hi, Itīs possible using Agenda.<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; please look<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; <a href="http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html_single/index.html#d0e1111">http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html_single/index.html#d0e1111</a><br>
&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; if you want I can give you an example.<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; 2008/7/25 Roger Tanuatmadja &lt;<a href="mailto:rogerst@gmail.com">rogerst@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;&gt; &gt; Hi,<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; I&#39;ve looked at the documentation, and I&#39;ve tried doing it in the IDE,<br>&gt;&gt; &gt;&gt; &gt; and<br>&gt;&gt; &gt;&gt; &gt; basically I don&#39;t think it&#39;s possible.<br>
&gt;&gt; &gt;&gt; &gt; Let&#39;s just say I have rule A and I want to reuse it as part of 2<br>&gt;&gt; &gt;&gt; &gt; different<br>&gt;&gt; &gt;&gt; &gt; rule flows. Is this possible? My guess is no.<br>&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Thanks,<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; Roger<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; _______________________________________________<br>&gt;&gt; &gt;&gt; &gt; rules-users mailing list<br>
&gt;&gt; &gt;&gt; &gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>&gt;&gt; &gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; --<br>&gt;&gt; &gt;&gt; Lic. Vanina Beraudo<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; rules-users mailing list<br>&gt;&gt; &gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>&gt;&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; _______________________________________________<br>&gt;&gt; &gt; rules-users mailing list<br>&gt;&gt; &gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; --<br>
&gt;&gt; Lic. Vanina Beraudo<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; rules-users mailing list<br>&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>
&gt;<br><br><br><br>--<br>Lic. Vanina Beraudo<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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>