<br>&nbsp;&nbsp; Arjun,<br><br>&nbsp;&nbsp; Did you tried to use agenda-groups and/or rule-flow to control the sequence of execution (assuming of course you are using 4.0MR2 or later)?<br><br>&nbsp;&nbsp; Basically the idea of these features is to implement phased rules firing, or as the name says, &quot;rule flows&quot;... so, for instance, if you are using agenda-groups, you can have all your rules for each table in a different agenda-group: &quot;table 1&quot;, &quot;table 2&quot;, etc... when the condition to move focus from one agenda-group to other is met ( for instance, table1-&gt;table2), you change the focus to the table2 agenda-group and then, even doing modify in objects that would usually trigger rules from table 1, the agenda group prevents that from happening. So you have your phased execution.
<br>&nbsp;&nbsp; Rule-flow kind of does the same thing, but is more flexible and powerful (a bit more complex too), allowing conditional transitions and a graphical design of you rule groups.<br><br>&nbsp;&nbsp; Unfortunately there are not many docs out there, but you can get some info from the wiki and the blog... also, keep asking your questions in the list and maybe give us a hand on documenting the features you eventually use so others can benefit too.
<br><br>&nbsp;&nbsp; Think that using agenda.remove(), besides being conceptually inappropriate, will only cause you headaches. I&#39;m sure there are ways of expressing your rules without incurring in such &quot;technical rules-engine specific hacks&quot;.
<br><br>&nbsp;&nbsp; Hope it helps,<br>&nbsp; &nbsp; &nbsp; &nbsp; Edson <br><br><div><span class="gmail_quote">2007/6/2, Arjun Dhar &lt;<a href="mailto:dhar_ar@yahoo.com">dhar_ar@yahoo.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;">
&gt;&nbsp;&nbsp;&nbsp;&nbsp; So, may I suggest you open a JIRA with your example for us to investigate<br>the bug? Also, I&#39;m tempted to refactor the interface if possible to not expose<br>the method remove() in the consequence...&nbsp;&nbsp;&nbsp;&nbsp;What removes does is to remove the
<br>activation from the agenda, but the activation already fired, so what&#39;s the<br>point of removing it? It may be the case that this is also creating an<br>inconsistent state in the engine, so we need to check if that&#39;s the case and
<br>not expose the method anymore...<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Also, maybe you can show us a more complete example of what you are<br>trying to achieve, so we can advise you on how to do it without calling the<br>activation remove() method.&nbsp;&nbsp;&nbsp;&nbsp;Thank you for reporting!&nbsp;&nbsp;&nbsp;&nbsp;Regards,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edson
<br><br>Hi Edson,<br> For a large number of rules comming from decison tables, when arranging them<br>sometimes it is helpful to modularize tables; with the result of one rule-table<br>driving another rule table. The preferred method is Decision table. Also this
<br>allows a person to lazy load rules over a set of base rules (part of the reason<br>is business process and stability around an established concept. The format<br>makes sense accoring to the business model also) &lt;-- Background, so now i&#39;ll
<br>get to the point!<br><br>So there is a need of one set of rules (outcome) to influence another (using<br>tables). Scenario is like this:<br><br>Table 1:<br>-----------<br>Rule 1.1<br>Rule 1.2.<br>Rule 1.3.<br><br><br>
Table 2:<br>----------<br>Rule 1.2.1 (If fires will influence 1.2)<br>Rule 1.2.2 (If fires will influence 1.2)<br><br>&gt;From this point on, you could suggest anything you see is not fit &lt;----<br><br>... Thre preferred way to influence the connection = Change an attribute of the
<br>same object (Since the specific rule in the top table cannot fire till its<br>conditions are not fullfilled); so when the attribute is set then only the<br>rules in the above table will become active for that object.<br>
<br>So when the &quot;Business Object&quot; is modified in Table 2, and hence modify() is<br>called.<br><br>You are right, the activation fires and is removed but due to modify() it<br>causes a re-firing and puts some already fired activation back in the Agenda.
<br><br>Initally it hung, I realized the reason and put &quot;no-loop&quot;. That stopped the<br>recursion but I noticed certain activationse firing multiple times (Ideally I&#39;d<br>like the activation to fire and get out but here it would add it back again)
<br>which is not acceptable.<br><br>I used &quot;drools.getActivation().remove()&quot; and it stopped the repeats, but then<br>it was removing subsequent activations as well. I know why now. What I want to<br>do is prevent this rule from firing again but inturn remove is removing the
<br>next activation. So the question is how to prevent the activation for that<br>object not to fire again????<br><br>My problem ends here (I understand it better now, not sure it should go into<br>JIRA yet. Would like your comments one more time)
<br><br>About your comment about removing it. Due to the declrative nature of rules<br>there are lot of conceptual barriers. So conceptual workarounds are restricted<br>by the technology so we need every advantage. But then again, if you show me a
<br>better path to a solution I&#39;d be more than happy.<br><br>Thanks Edson, Appreciate it!<br><br>_______________________________________________<br>rules-dev mailing list<br><a href="mailto:rules-dev@lists.jboss.org">
rules-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>
&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<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>