<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>Hi 
all,</FONT></SPAN></DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>It seems to me that 
the no-loop only prevents a rule from triggering itself - and doesn't make the 
rule only fire once (which is what I'm after)</FONT></SPAN></DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>e.g. consider the 
following two contrived simple rules:</FONT></SPAN></DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>rule 
  "addPriorityPrefix"<BR>&nbsp;dialect "java"<BR>&nbsp;no-loop 
  true<BR>&nbsp;when<BR>&nbsp;&nbsp;$work : Work (priority &gt;= 
  200)<BR>&nbsp;then<BR>&nbsp;&nbsp;modify($work) 
  {<BR>&nbsp;&nbsp;&nbsp;setTitle("!!! " + 
  getTitle());<BR>&nbsp;&nbsp;};<BR>end</FONT></SPAN></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>rule "re-assign 
  low priority tasks"<BR>&nbsp;dialect "java"<BR>&nbsp;no-loop 
  true<BR>&nbsp;when<BR>&nbsp;&nbsp;$work : Work (priority &lt; 
  -200)<BR>&nbsp;then<BR>&nbsp;&nbsp;modify($work) 
  {<BR>&nbsp;&nbsp;&nbsp;setOwner("nobody");<BR>&nbsp;&nbsp;};<BR>end</FONT></SPAN><SPAN 
  class=911285815-23092009><FONT face=Arial 
size=2></FONT></SPAN></DIV></BLOCKQUOTE>
<DIV><SPAN class=911285815-23092009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>What I end up with 
is an infinte loop.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>Whilst for the 
simple case I can re-write them like </FONT></SPAN></DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
$work : Work (priority &gt;= 200, 
!title.startWith("!!!"))<BR></FONT></SPAN></DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>however with the 
more complex rules this makes the rules get very complex quickly and less easy 
to write. Is there a way to prevent these loops - have I misunderstood or do you 
really need to check everything in the rule that you may 
set?</FONT></SPAN></DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>How would you do the 
banking interest example?</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>rule "interest 
  calculation"<BR>&nbsp; no-loop<BR>&nbsp; when<BR>&nbsp;&nbsp;&nbsp; $account : 
  Account( )<BR>&nbsp; then<BR>&nbsp;&nbsp;&nbsp; modify($account) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setBalance((long)($account.getBalance() * 
  1.01) )<BR>&nbsp;&nbsp;&nbsp; };<BR>end</FONT></SPAN></DIV></BLOCKQUOTE>
<DIV><SPAN class=911285815-23092009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>if there was another 
rule that if you where a gold customer and payed in &gt; $500 the previous month 
then you get $4 bonus?</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>rule "gold 
  bonus"<BR>&nbsp; no-loop<BR>&nbsp; when<BR>&nbsp;&nbsp;&nbsp; $account : 
  Account(type="gold", previousMonthDeposit &gt; 500 )<BR>&nbsp; 
  then<BR>&nbsp;&nbsp;&nbsp; modify($account) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setBalance((long)($account.getBalance() + 
  4) )<BR>&nbsp;&nbsp;&nbsp; };<BR>end</FONT></SPAN></DIV></BLOCKQUOTE>
<DIV><SPAN class=911285815-23092009></SPAN>&nbsp;</DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial 
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=911285815-23092009><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
/James</DIV></FONT></SPAN><br>**************************************************************************************<br>This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br><br>NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>**************************************************************************************</BODY></HTML>