<div dir="ltr">Hi Thomas,<br><br>A quick solution would be to use agenda groups as follows:<br><br>rule &quot;Rule Init&quot;<br>&nbsp;dialect &quot;java&quot;<br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; drools.setFocus(&quot;calculate&quot;);<br>

end<br><br>rule &quot;Rule 1&quot;<br>&nbsp;dialect &quot;java&quot;<br>&nbsp;lock-on-active true<br>&nbsp;agenda-group &quot;calculate&quot;<br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...<br>end<br><br>rule &quot;Rule 2&quot;<br>

&nbsp;dialect &quot;java&quot;<br>&nbsp;lock-on-active true<br>&nbsp;agenda-group &quot;calculate&quot;<br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; ...<br>end<br><br>The result is:<br>Rule Init<br>Rule 2<br>Rule 1<br><br>You can also use ruleflow (ruleflow-group) to achieve this. I think it is the preferred way.<br>

Hope it helps.<br><br>Best Regards,<br><font color="#888888">Michal</font><br><br><div class="gmail_quote">On Wed, Sep 10, 2008 at 2:10 PM, thomas kukofka <span dir="ltr">&lt;<a href="mailto:thomaskukofka@web.de">thomaskukofka@web.de</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;"><div dir="ltr">Hello,<br><br>thanks for your quick reply.<br>I understand your explanation, but adding the <i>lock-on-active rule attribute to rule 1 and 2 only results that none of these rules is executed.<br>
What I want to be excuted for the values below:<br>
</i>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TestObject io = new TestObject(TestObject.Type.INPUT);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; io.setDoublePropertyValue(TestObject.PARAMETER1, <span style="background-color: rgb(255, 255, 0);">0.2</span>);<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TestObject io2 = new TestObject(TestObject.Type.INPUT);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; io2.setDoublePropertyValue(TestObject.PARAMETER1, <span style="background-color: rgb(255, 255, 102);">7.3</span>);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert(io);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert(io2);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fireallrules();<br>

<br>is:<br><b>Rule Init<br>Rule 1<br>Rule 2<br></b><br>Best Regards<br>Thomas<br><br><blockquote><i>Hi,<br><br>Looking at the .drl file, rules 1,2 are updating objects that are part of<br>their conditions. That will loop even with no-loop set to true.<br>

<br>Look at lock-on-active rule attribute, which may solve your issue.<br><br>Best Regards,<br>Michal</i><br></blockquote></div>
</blockquote></div><br></div>