<!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=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> 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 1:27 AM<BR><B>To:</B> Rules Users 
List<BR><B>Subject:</B> Re: [rules-users] Double<BR></FONT><BR></DIV>
<DIV></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><B><FONT color=#960000 size=2></FONT></B>
  <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><FONT 
  size=2></FONT>
  <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><FONT size=2></FONT>
  <P align=left><B><FONT color=#960000 size=2>when</FONT></B></P><FONT 
  size=2></FONT>
  <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><FONT 
  size=2></FONT>
  <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">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>