OK, I think I found it and here is what the rule could look like:<br><br>rule "Repayment Code Requires Approval"<br> salience 60<br> <br> when<br> repaymentCode : RepaymentCode( code == "MD", matchApprv == "Y" )
<br> mdOutput : ModelDiscrepancyOutput( $amt1 : sumRTVQty, sumCmAndRnr == $amt1)<br> then <br> System.out.println("Repayment Code Requires Approval");<br> processMDAdjustments(drools.getWorkingMemory
().getQueryResults( "MD Adjustments" ), StatusConstants.APPROVAL);<br> System.out.println("mdOutput: " + mdOutput);<br>end<br><br>Now my question is, how does Drools handle these objects and the comparison because the underlying objects are BigDecimal?
<br><br><div><span class="gmail_quote">On 7/9/07, <b class="gmail_sendername">Ronald R. DiFrango</b> <<a href="mailto:ron.difrango@gmail.com">ron.difrango@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
All,<br><br>I have the following rule:<br><br>rule "Repayment Code Requires Approval"<br> salience 60<br> <br> when<br> repaymentCode : RepaymentCode( code == "MD", matchApprv == "Y" )
<br> mdOutput : ModelDiscrepancyOutput( $amt1 : sumRTVQty, $amt2 : sumCmAndRnr)<br> eval($amt1.doubleValue() == $amt2.doubleValue())<br> then <br> System.out.println("Repayment Code Requires Approval");
<br> processMDAdjustments(drools.getWorkingMemory().getQueryResults( "MD Adjustments" ), StatusConstants.APPROVAL);<br> System.out.println("mdOutput: " + mdOutput);<br>end<br><br>If I remember correctly, there was going to be an update to the rules language that would allow me to eliminate the eval. Is this true and if so what is the syntax that accomplishes this?
<br><br><span id="st" name="st" class="st">Ron</span><br>
</blockquote></div><br>