On Mon, Jan 4, 2010 at 10:46 AM, xalperte <javier.alperte@rudder-tech.com> wrote:


Wolfgang Laun-2 wrote:
>
> Try
> (a) declaring parameters days and percentage as Integer
> (b) keep the function as is, but remove dialect "mvel" from the rule.
>

Hi, thank you for your quick response.

I'm using Drools 5.0.1 in JBoss AS 4.2.3.

I've tested the two options with the following results:

b) Changing the dialect from mvel to java: Runs OK!

So, does this solve your predicament, at least, temporarily?



a) Change the parameters signature from int to Integer throws the following
exception:

Avoiding literals and declaring two int's on the RHS might be worth another try,
if you really need mvel,

int d = ...;
int p =...;
addBookingPayment($request, d, p );

-W
 

org.drools.runtime.rule.ConsequenceException: [Error: unable to resolve
method:
kobo.regularSafaris.AddBookingPayment.addBookingPayment(kobo.regularSafaris.BookingRequest,
java.lang.Integer, java.lang.Integer) [arglength=3]]
[Near : {... Unknown ....}]
            ^
[Line: 1, Column: 0]
       at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)