rule
"sum higher rate totals" salience 970 no-loop true whentimesheet : TimesheetTransferObject( )
total : SheetTotalTransferObject($ihrisType : ihrisType -> ($ihrisType.equals(ihrisType.getDutyHourTotal())), $payRate : payRate -> ($payRate.equals(timesheet.getOfficer().getSubstantiativeRate()) ==
false)) eval(total.getValue().doubleValue() > 0)highDutyTotal : Double( )
thenhighDutyTotal =
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?