[rules-users] Double

Matthew Shaw mshaw at emergency.qld.gov.au
Mon May 28 23:39:32 EDT 2007


Hi there,
 
seeing some very strange behaviour from the following rule
 
rule "sum higher rate totals"

salience 970

no-loop true

when

timesheet : TimesheetTransferObject( )

total : SheetTotalTransferObject($ihrisType : ihrisType ->
($ihrisType.equals(ihrisType.getDutyHourTotal())), $payRate : payRate ->
($payRate.equals(timesheet.getOfficer().getSubstantiativeRate()) ==
false))

eval(total.getValue().doubleValue() > 0)

highDutyTotal : Double( )

then

highDutyTotal = new
Double(DateUtils.addElapsedTimes(highDutyTotal.doubleValue(),
total.getValue().doubleValue()));

modify(highDutyTotal)

end

In my test the rule fires twice when I don't call modify. Which is the
expected behaviour because I have two unqiue SheetTotalTransferObject
objects.

However when I call modify on the Double object the rule only runs once.
This is incorrect behaviour.

 

Can anyone offer any clues as to what may be happening here. Is it to do
with my use of the Double type?



This correspondence is for the named persons only. 
It may contain confidential or privileged information or both. 
No confidentiality or privilege is waived or lost by any mis transmission. 
If you receive this correspondence in error please delete it from your system immediately and notify the sender. 
You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient. 
Any opinions expressed in this message are those of the individual sender except where the sender expressly, 
and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070529/b0c92e5c/attachment.html 


More information about the rules-users mailing list