Really, it's not my code so I don't know way :( and looking for $cm, I found it
seems to be already an int!
Da: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] Per
conto di Wolfgang Laun
Inviato: martedì 17 maggio 2011 11:43
A: Rules Users List
Oggetto: Re: [rules-users] Cast error message and DSL
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
On 17 May 2011 10:42, Giorgio Spagnardi
<g.spagnardi@reply.it<mailto:g.spagnardi@reply.it>> wrote:
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-tp2951642p29...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
________________________________
--
The information transmitted is intended for the person or entity to which it is addressed
and may contain confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon, this information
by persons or entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any computer.