It seems that $cm is of type "int". And this just can't be cast to java.lang.Integer.
There are several ways for creating an Integer from an int, but why do you do the cast at all?
-W
Hi to all,
I used the business rule guided editor to write a new rule. I'm verifying
the wrtitten rule but Guvnor returns the error message:
[MyRule] Unable to build expression for 'consequence': [Error: unable to
cast type: int; to: class java.lang.Integer] [Near : {...
tValue()));drools.update($sa); ....}] ^
[Line: 1, Column: 67] ' $sa.setBonusEsclusivo(percentuale(25,
((Integer)$cm).intValue()));update($sa);'
In DSL there is: [consequence][] Assign customer bonus of {num} percent=
$sa.setBonusEsclusivo(percentuale({num},
((Integer)$cm).intValue()));update($sa);
I didn't find a similiar error message....
Thanks in advance,
G.
--
View this message in context: http://drools.46999.n3.nabble.com/Cast-error-message-and-DSL-tp2951642p2951642.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users