<font size="2"><font face="verdana,sans-serif">Hi again,</font></font><div><font size="2"><font face="verdana,sans-serif"><br></font></font></div><div><font size="2"><font face="verdana,sans-serif">Thank you for clearing that up. I didn&#39;t think it worked that way because i&#39;ve tried it before and it didn&#39;t work. Anyway, according to what you&#39;re saying...</font></font></div>
<div><font size="2"><font face="verdana,sans-serif"><br></font></font></div><div><font size="2"><font face="verdana,sans-serif">* this is the stack as soon as i insert my objects: | MAIN |</font></font></div><div><font size="2"><font face="verdana,sans-serif"><br>
</font></font></div><div><font size="2"><font face="verdana,sans-serif">* this is the stack as soon as i setFocus on a specific agenda-group: | FOCUSED_GROUP | MAIN | (from left to right)</font></font></div><div><font size="2"><font face="verdana,sans-serif"><br>
</font></font></div><div><font size="2"><font face="verdana,sans-serif">* as soon as all activations from FOCUSED_GROUP fire, that agenda-group is popped out of the stack and the rule engine fires the remaining activations from MAIN</font></font></div>
<div><font size="2"><font face="verdana,sans-serif"><br></font></font></div><div><font size="2"><font face="verdana,sans-serif">Is this the way it works? I&#39;ve tried this before with no success. I get rules firing from agenda-groups that *are not focused before* (besides MAIN, of course). Maybe this has something to do with the rules being declared in XML? Or some kind of bug?</font></font></div>
<div><font size="2"><font face="verdana,sans-serif"><br></font></font></div><div><font class="Apple-style-span" face="verdana, sans-serif">Thank you.</font></div><div><font class="Apple-style-span" face="verdana, sans-serif">_ miguel</font></div>
<div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div><div><font size="2"><font face="verdana,sans-serif"><br></font></font></div><div><font size="2"><font face="verdana,sans-serif"><br></font></font><br>
<div class="gmail_quote">On Wed, May 5, 2010 at 6:40 AM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt; @Wolfgang:</div><div class="im">
&gt; My problem is that i cannot have the different rule groups stacked. I may do<br>
&gt; as you suggested, but i&#39;ll have rules firing from other agenda-groups after<br>
&gt; the first agenda-group activations are all gone (because they go into the<br>
&gt; stack as well, right?).<br>
<br>
</div>No, no, no! Nothing goes on the stack unless you setFocus()!<br>
<div class="im"><br>
What i&#39;m looking for is a way to isolate the<br>
&gt; execution and just fire the rules within a specific set (aka just one<br>
&gt; group). Does this make any sense?<br>
<br>
</div>This is *exactly* what my sketchy statement sequence does, in<br>
an existing application.<br>
<font color="#888888">-W<br>
</font><div><div></div><div class="h5"><br>
&gt; Thank you for your support. I appreciate all the help i can get.<br>
&gt; _ miguel<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, May 4, 2010 at 4:46 PM, Wolfgang Laun &lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve been using agenda groups without any trouble for a similar problem,<br>
&gt;&gt; doing<br>
&gt;&gt;  setFocus( ... );<br>
&gt;&gt;  insert( ... );... insert( ... );<br>
&gt;&gt;  fireAllRules();<br>
&gt;&gt; repeatedly.<br>
&gt;&gt;<br>
&gt;&gt; You don&#39;t have to be afraid of the focus stack growing indefinitely:You<br>
&gt;&gt; control<br>
&gt;&gt; the &quot;push&quot; (setFocus()), and if an agenda group&#39;s activations are all<br>
&gt;&gt; gone, the<br>
&gt;&gt; group is automatically popped from the stack.<br>
&gt;&gt;<br>
&gt;&gt; -W<br>
&gt;&gt;<br>
&gt;&gt; 2010/5/4 Miguel Machado &lt;<a href="mailto:mls.machado@gmail.com">mls.machado@gmail.com</a>&gt;:<br>
&gt;&gt; &gt; Hi there,<br>
&gt;&gt; &gt; I&#39;m having some trouble implementing the desired workflow of rule firing<br>
&gt;&gt; &gt; in<br>
&gt;&gt; &gt; an application using drools expert. I&#39;ve read the thread about the<br>
&gt;&gt; &gt; difference between ruleflow groups and agenda groups, but it is still<br>
&gt;&gt; &gt; unclear to me how to achieve what i need.<br>
&gt;&gt; &gt; What i intend to have is the ability to fire a specific set of rules<br>
&gt;&gt; &gt; according to the object i&#39;m inserting into the ksession.<br>
&gt;&gt; &gt; I do not want to use agenda-groups because it stacks all the agenda<br>
&gt;&gt; &gt; groups<br>
&gt;&gt; &gt; declared on the rule file (as far as i understand) and therefore it may<br>
&gt;&gt; &gt; fire<br>
&gt;&gt; &gt; activations i do not want to be fired. Instead, i want to isolate them<br>
&gt;&gt; &gt; completely. I tried using ruleflow groups for this, but i cannot find a<br>
&gt;&gt; &gt; way<br>
&gt;&gt; &gt; to activate a specific group programmatically, before calling<br>
&gt;&gt; &gt; fireAllRules(), the way i can with agenda-groups (setFocus() method).<br>
&gt;&gt; &gt; That being said, i&#39;m asking for help in trying to use either one of<br>
&gt;&gt; &gt; ruleflow/agenda groups or even both in order to get things working the<br>
&gt;&gt; &gt; way i<br>
&gt;&gt; &gt; described.<br>
&gt;&gt; &gt; Thanks in advance,<br>
&gt;&gt; &gt; _ miguel<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" target="_blank">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; 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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; &quot;To understand what is recursion you must first understand recursion&quot;<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>&quot;To understand what is recursion you must first understand recursion&quot;<br>
</div>