<!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.2900.3059" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=999043801-30052007><FONT face=Arial 
color=#0000ff size=2>ok point taken. I have modified my rule so that it looks at 
an object and I modify a property on that object instead as follows: But still 
the same issue.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=999043801-30052007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=999043801-30052007><B><FONT color=#960000 
size=2>
<P align=left>rule</B></FONT><FONT size=2> </FONT><FONT color=#008000 
size=2>"sum higher rate totals"</P></FONT><FONT size=2>
<P align=left></FONT><B><FONT color=#960000 size=2>salience</B></FONT><FONT 
size=2> 970</P>
<P align=left></FONT><B><FONT color=#960000 size=2>no-loop</B></FONT><FONT 
size=2> </FONT><B><FONT color=#960000 size=2>true</P></B></FONT><FONT size=2>
<P align=left></FONT><B><FONT color=#960000 size=2>when</P></B></FONT><FONT 
size=2>
<P align=left>timesheet : TimesheetTransferObject( )</P>
<P align=left>total : SheetTotalTransferObject($ihrisType : ihrisType -&gt; 
($ihrisType.equals(ihrisType.getDutyHourTotal())), $payRate : payRate -&gt; 
($payRate.equals(timesheet.getOfficer().getSubstantiativeRate()) == 
</FONT><B><FONT color=#960000 size=2>false</B></FONT><FONT size=2>))</P>
<P align=left></FONT><B><FONT color=#960000 size=2>eval</B></FONT><FONT 
size=2>(total.getValue().doubleValue() &gt; 0)</P>
<P align=left>higherDutyTotal : DutyHourTotal( )</P>
<P align=left></FONT><B><FONT color=#960000 size=2>then</P></B></FONT><FONT 
size=2>
<P 
align=left>higherDutyTotal.setNrHours(DateUtils.addElapsedTimes(higherDutyTotal.getNrHours(), 
total.getValue().doubleValue()));</P>
<P align=left></FONT><B><FONT color=#960000 size=2>modify</B></FONT><FONT 
size=2>(higherDutyTotal);</P></FONT><B>
<P><FONT color=#960000 size=2>end</FONT></P>
<P><SPAN class=999043801-30052007><FONT color=#960000 
size=2></FONT></SPAN>&nbsp;</P></B></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
[mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Mark 
Proctor<BR><B>Sent:</B> Wednesday, 30 May 2007 11:17 AM<BR><B>To:</B> Rules 
Users List<BR><B>Subject:</B> Re: [rules-users] Double<BR></FONT><BR></DIV>
<DIV></DIV>It's standard java pass by reference stuff:<BR>String a = 
"xxx";<BR>String b = a;<BR>System.out.println( b ); // gives "xxx"<BR>a = 
"yyyy";<BR>System.out.println( b ); // still gives 
"xxx"<BR><BR>Mark<BR><BR>Matthew Shaw wrote: 
<BLOCKQUOTE 
cite=mid:48703C6F55B7D546A572FDA807A5FDBCD6968A@BNEEML01.desqld.internal 
type="cite">
  <META content="MSHTML 6.00.2900.3059" name=GENERATOR>
  <DIV dir=ltr align=left><SPAN class=734231900-30052007><FONT face=Arial 
  color=#0000ff size=2>Why is it seeing it as a new object? I am asserting it 
  into the working memory before hand.</FONT></SPAN></DIV><BR>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> <A class=moz-txt-link-abbreviated 
  href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</A> 
  [<A class=moz-txt-link-freetext 
  href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</A>] 
  <B>On Behalf Of </B>Mark Proctor<BR><B>Sent:</B> Wednesday, 30 May 2007 1:27 
  AM<BR><B>To:</B> Rules Users List<BR><B>Subject:</B> Re: [rules-users] 
  Double<BR></FONT><BR></DIV>highDutyTotal is a new fact inside of your 
  consequence, so when you call modify, it's actually working as an assert - you 
  are not doing a modify there at all.<BR><BR>Mark<BR>Matthew Shaw wrote: 
  <BLOCKQUOTE 
  cite=mid:48703C6F55B7D546A572FDA807A5FDBCD6957A@BNEEML01.desqld.internal 
  type="cite">
    <META content="MSHTML 6.00.2900.3059" name=GENERATOR>
    <DIV><SPAN class=238193603-29052007><FONT face=Arial size=2>Hi 
    there,</FONT></SPAN></DIV>
    <DIV><SPAN class=238193603-29052007></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=238193603-29052007><FONT face=Arial size=2>seeing some very 
    strange behaviour from the following rule</FONT></SPAN></DIV>
    <DIV><SPAN class=238193603-29052007></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=238193603-29052007>
    <P align=left><B><FONT color=#960000 size=2>rule</FONT></B><FONT size=2> 
    </FONT><FONT color=#008000 size=2>"sum higher rate totals"</FONT></P>
    <P align=left><B><FONT color=#960000 size=2>salience</FONT></B><FONT size=2> 
    970</FONT></P>
    <P align=left><B><FONT color=#960000 size=2>no-loop</FONT></B><FONT size=2> 
    </FONT><B><FONT color=#960000 size=2>true</FONT></B></P>
    <P align=left><B><FONT color=#960000 size=2>when</FONT></B></P>
    <P align=left><FONT size=2>timesheet : TimesheetTransferObject( )</FONT></P>
    <P align=left><FONT size=2>total : SheetTotalTransferObject($ihrisType : 
    ihrisType -&gt; ($ihrisType.equals(ihrisType.getDutyHourTotal())), $payRate 
    : payRate -&gt; 
    ($payRate.equals(timesheet.getOfficer().getSubstantiativeRate()) == 
    </FONT><B><FONT color=#960000 size=2>false</FONT></B><FONT 
    size=2>))</FONT></P>
    <P align=left><B><FONT color=#960000 size=2>eval</FONT></B><FONT 
    size=2>(total.getValue().doubleValue() &gt; 0)</FONT></P>
    <P align=left><FONT size=2>highDutyTotal : Double( )</FONT></P>
    <P align=left><B><FONT color=#960000 size=2>then</FONT></B></P>
    <P align=left><FONT size=2>highDutyTotal = </FONT><B><FONT color=#960000 
    size=2>new</FONT></B><FONT size=2> 
    Double(DateUtils.addElapsedTimes(highDutyTotal.doubleValue(), 
    total.getValue().doubleValue()));</FONT></P>
    <P align=left><SPAN class=238193603-29052007><FONT 
    size=2>modify(highDutyTotal)</FONT></SPAN></P><FONT color=#960000>
    <P><FONT size=2><STRONG>end</STRONG></FONT></P>
    <P><SPAN class=238193603-29052007><FONT face=Arial color=#000000 size=2>In 
    my test the rule fires twice when I don't call modify. Which is the expected 
    behaviour because I have two unqiue <FONT 
    face="Times New Roman">SheetTotalTransferObject 
    objects.</FONT></FONT></SPAN></P>
    <P><SPAN class=238193603-29052007><FONT color=#000000 size=2>However when I 
    call modify on the Double object the rule only runs once. This is incorrect 
    behaviour.</FONT></SPAN></P>
    <P><SPAN class=238193603-29052007></SPAN>&nbsp;</P>
    <P><SPAN class=238193603-29052007><FONT color=#000000 size=2>Can anyone 
    offer any clues as to what may be happening here. Is it to do with my use of 
    the Double type?</FONT></SPAN></P></FONT></SPAN></DIV>
    <TABLE>
      <TBODY>
      <TR>
        <TD bgColor=#ffffff><FONT color=#000000>This correspondence is for the 
          named persons only. <BR>It may contain confidential or privileged 
          information or both. <BR>No confidentiality or privilege is waived or 
          lost by any mis transmission. <BR>If you receive this correspondence 
          in error please delete it from your system immediately and notify the 
          sender. <BR>You must not disclose, copy or relay on any part of this 
          correspondence, if you are not the intended recipient. <BR>Any 
          opinions expressed in this message are those of the individual sender 
          except where the sender expressly, <BR>and with the authority, states 
          them to be the opinions of the Department of Emergency Services, 
          Queensland.<BR></FONT></TD></TR></TBODY></TABLE><PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
rules-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:rules-users@lists.jboss.org" moz-do-not-send="true">rules-users@lists.jboss.org</A>
<A class=moz-txt-link-freetext href="https://lists.jboss.org/mailman/listinfo/rules-users" moz-do-not-send="true">https://lists.jboss.org/mailman/listinfo/rules-users</A>
  </PRE></BLOCKQUOTE><BR>
  <TABLE>
    <TBODY>
    <TR>
      <TD bgColor=#ffffff><FONT color=#000000>This correspondence is for the 
        named persons only. <BR>It may contain confidential or privileged 
        information or both. <BR>No confidentiality or privilege is waived or 
        lost by any mis transmission. <BR>If you receive this correspondence in 
        error please delete it from your system immediately and notify the 
        sender. <BR>You must not disclose, copy or relay on any part of this 
        correspondence, if you are not the intended recipient. <BR>Any opinions 
        expressed in this message are those of the individual sender except 
        where the sender expressly, <BR>and with the authority, states them to 
        be the opinions of the Department of Emergency Services, 
        Queensland.<BR></FONT></TD></TR></TBODY></TABLE><PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
rules-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A>
<A class=moz-txt-link-freetext href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A>
  </PRE></BLOCKQUOTE><BR></BODY></HTML>

<table><tr><td bgcolor=#ffffff><font color=#000000>This correspondence is for the named persons only. <br>
It may contain confidential or privileged information or both. <br>
No confidentiality or privilege is waived or lost by any mis transmission. <br>
If you receive this correspondence in error please delete it from your system immediately and notify the sender. <br>
You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient. <br>
Any opinions expressed in this message are those of the individual sender except where the sender expressly, <br>
and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.<br>
</font></td></tr></table>