<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">This is perhaps not the performance
hit you think it is as the rules are evaluated as they are loaded. The
Rete algorithm will evaluate that the rule is not null and trigger.</font>
<br>
<br><font size=2 face="sans-serif">Another consideration is that you may
need to use a flatter fact-model if you're drilling down with 'from' operators
and needing to trap for nulls.</font>
<br>
<br><font size=2 face="sans-serif">Aside from that, if you use Rule Flow
Groups and a Rule Flow as Michael Anstis suggested:You can use a Split
Connector to branch around that section of ruleflow, and a Join Connector
to continue, connected either to the next ruleflow step, or to a Stop.</font>
<br>
<br><font size=2 face="sans-serif">Regards,</font>
<br><font size=2 face="sans-serif">-Trav</font>
<br><font size=2 face="sans-serif"><br>
</font><font size=1 face="Arial"><b>Travis Smith</b><br>
Analyst Programmer<br>
Development Centre<br>
BNZ<br>
<br>
DDI: +644 4746356 (Or Ext 76356)</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<br><font size=1 color=#800080 face="Arial"><b>Sathya Prakash &lt;prakashagarval@gmail.com&gt;</b></font>
<br><font size=1 color=#800080 face="sans-serif">Sent by: </font><font size=1 color=#800080 face="sans-serif">rules-users-bounces@lists.jboss.org</font>
<p><font size=1 face="sans-serif">17/02/2011 11:51 a.m.</font>
<br><font size=1 face="sans-serif">Please respond to<br>
Rules Users List &lt;rules-users@lists.jboss.org&gt;</font>
<td>
<td>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">Mauricio Salatino &lt;salaboy@gmail.com&gt;,
michael.anstis@gmail.com</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top><font size=1 face="sans-serif">Rules Users List &lt;rules-users@lists.jboss.org&gt;</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">Re: [rules-users] how to
stop rule execution</font></table>
<br></table>
<br>
<br>
<br>
<br><font size=3>I got great Idea by this discussion.</font>
<br>
<br><font size=3>If there is no way of stopping rules then I can do this
null condition check before executing rules. Adding one action in JBoss&nbsp;ESB
will solve problem.</font>
<br>
<br><font size=3>Please suggest me.</font>
<br>
<br><font size=3>Many Thanks in advance.</font>
<br>
<br>
<br><font size=3>Regards,</font>
<br><font size=3>Sathya Prakash.<br>
</font>
<br><font size=3>On Thu, Feb 17, 2011 at 2:39 AM, Sathya Prakash &lt;</font><a href=mailto:prakashagarval@gmail.com><font size=3 color=blue><u>prakashagarval@gmail.com</u></font></a><font size=3>&gt;
wrote:</font>
<br><font size=3>Thanks for your suggestion..</font>
<br>
<br><font size=3>But let us assume i have 100 rules based on single response.
When response is null then if i am doing null check in all rules then it
degrades the performance. &nbsp;My application hits are &nbsp;million per
day. if 1 % percent fails think about the impact.</font>
<br>
<br><font size=3><b>Regards,</b></font>
<br><font size=3><b>Sathya Prakash.</b></font>
<br>
<br><font size=3>On Thu, Feb 17, 2011 at 2:26 AM, Mauricio Salatino &lt;</font><a href=mailto:salaboy@gmail.com target=_blank><font size=3 color=blue><u>salaboy@gmail.com</u></font></a><font size=3>&gt;
wrote:</font>
<br><font size=3>you can do something like:<br>
</font>
<br><font size=2 face="Verdana">rule &quot;Error Check&quot;<br>
salience 100<br>
<br>
when</font>
<br><font size=2 face="Verdana">error condition check</font>
<br><font size=2 face="Verdana">then</font>
<br><font size=2 face="Verdana">System.Out.Println(&quot;Response has errors&quot;);</font>
<br><font size=2 face="Verdana">XXXXXXXXXXXXXXXXXXXXXXXX to exit from rule
execution</font>
<br><font size=2 face="Verdana">insert(Stop())</font>
<br><font size=2 face="Verdana">end</font>
<br><font size=2 face="Verdana"><br>
<br>
rule &quot;Rule-01&quot;<br>
salience 99<br>
when</font>
<br><font size=2 face="Verdana">not(Stop())</font>
<br><font size=2 face="Verdana">repsonse.getxx()</font>
<br>
<br><font size=2 face="Verdana">then&nbsp;</font>
<br>
<br><font size=2 face="Verdana">end.</font>
<br><font size=3><br>
</font>
<br><font size=3>2011/2/16 Sathya Prakash &lt;</font><a href=mailto:prakashagarval@gmail.com target=_blank><font size=3 color=blue><u>prakashagarval@gmail.com</u></font></a><font size=3>&gt;</font>
<br><font size=3>Hi,</font>
<br>
<br><font size=3>How to stop rule execution in &nbsp;technical rule,&nbsp;</font>
<br><font size=3>Example&nbsp;</font>
<br>
<br><font size=2 face="Verdana">rule &quot;Error Check&quot;<br>
salience 100<br>
<br>
when</font>
<br><font size=2 face="Verdana">error condition check</font>
<br><font size=2 face="Verdana">then</font>
<br><font size=2 face="Verdana">System.Out.Println(&quot;Response has errors&quot;);</font>
<br><font size=2 face="Verdana">XXXXXXXXXXXXXXXXXXXXXXXX to exit from rule
execution</font>
<br><font size=2 face="Verdana">end</font>
<br><font size=2 face="Verdana"><br>
<br>
rule &quot;Rule-01&quot;<br>
salience 99<br>
when</font>
<br><font size=2 face="Verdana">repsonse.getxx()</font>
<br>
<br><font size=2 face="Verdana">then&nbsp;</font>
<br>
<br><font size=2 face="Verdana">end.</font>
<br>
<br><font size=2 face="Verdana">if first rule then part executed means
the response is error hence we should not execute second.</font>
<br><font size=2 face="Verdana">Is there any way to exit rule execution.</font>
<br>
<br>
<br><font size=2 face="Verdana">Regards,</font>
<br><font size=2 face="Verdana">Sathya Prakash.</font>
<br>
<br><font size=3>_______________________________________________<br>
rules-users mailing list</font><font size=3 color=blue><u><br>
</u></font><a href="mailto:rules-users@lists.jboss.org" target=_blank><font size=3 color=blue><u>rules-users@lists.jboss.org</u></font></a><font size=3 color=blue><u><br>
</u></font><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target=_blank><font size=3 color=blue><u>https://lists.jboss.org/mailman/listinfo/rules-users</u></font></a><font size=3><br>
</font>
<br><font size=3 color=#8f8f8f><br>
<br>
<br>
-- <br>
&nbsp;- CTO @ </font><a href=http://www.plugtree.com/ target=_blank><font size=3 color=blue><u>http://www.plugtree.com</u></font></a><font size=3 color=#8f8f8f>&nbsp;
<br>
&nbsp;- MyJourney @ </font><a href=http://salaboy.wordpress.com/ target=_blank><font size=3 color=blue><u>http://salaboy.wordpress.com</u></font></a><font size=3 color=#8f8f8f><br>
&nbsp;- Co-Founder @ </font><a href=http://www.jbug.com.ar/ target=_blank><font size=3 color=blue><u>http://www.jbug.com.ar</u></font></a><font size=3 color=#8f8f8f><br>
&nbsp;<br>
&nbsp;- Salatino &quot;Salaboy&quot; Mauricio -</font>
<br><font size=3><br>
<br>
</font>
<br><font size=3>-- </font>
<br><font size=3>Cheers,<br>
Sathya Prakash.<b><br>
సత్య ప్రకాష్</b>.</font>
<br>
<br><font size=3><br>
<br>
<br>
-- </font>
<br><font size=3>Cheers,<br>
Sathya Prakash.<b><br>
సత్య ప్రకాష్</b>.</font>
<br><tt><font size=2>_______________________________________________<br>
rules-users mailing list<br>
rules-users@lists.jboss.org<br>
https://lists.jboss.org/mailman/listinfo/rules-users<br>
</font></tt>
<br>
<pre>
CAUTION - This message may contain privileged and confidential information 
intended only for the use of the addressee named above. If you are not the 
intended recipient of this message you are hereby notified that any use, 
dissemination, distribution or reproduction of this message is prohibited. 
This email was sent by the Bank of New Zealand. You can contact us on 
0800 ASK BNZ (0800 275 269). Any views expressed in this message are those 
of the individual sender and may not necessarily reflect the views of Bank 
of New Zealand.
</pre>