On Mon, Jan 4, 2010 at 10:46 AM, xalperte <span dir="ltr">&lt;<a href="mailto:javier.alperte@rudder-tech.com">javier.alperte@rudder-tech.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
<br>
Wolfgang Laun-2 wrote:<br>
&gt;<br>
&gt; Try<br>
&gt; (a) declaring parameters days and percentage as Integer<br>
&gt; (b) keep the function as is, but remove dialect &quot;mvel&quot; from the rule.<br>
&gt;<br>
<br>
</div>Hi, thank you for your quick response.<br>
<br>
I&#39;m using Drools 5.0.1 in JBoss AS 4.2.3.<br>
<br>
I&#39;ve tested the two options with the following results:<br>
<br>
b) Changing the dialect from mvel to java: Runs OK!<br></blockquote><div><br>So, does this solve your predicament, at least, temporarily?<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
a) Change the parameters signature from int to Integer throws the following<br>
exception:<br></blockquote><div><br>Avoiding literals and declaring two int&#39;s on the RHS might be worth another try,<br>if you really need mvel,<br><br>int d = ...;<br>int p =...;<br>addBookingPayment($request, d, p );<br>
<br>-W<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
org.drools.runtime.rule.ConsequenceException: [Error: unable to resolve<br>
method:<br>
kobo.regularSafaris.AddBookingPayment.addBookingPayment(kobo.regularSafaris.BookingRequest,<br>
java.lang.Integer, java.lang.Integer) [arglength=3]]<br>
[Near : {... Unknown ....}]<br>
             ^<br>
[Line: 1, Column: 0]<br>
        at<br>
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)<br> 
 <br></div></blockquote></div><br>