hi,
looks like your data comes as a primitive int, hence the type cast
exception.
On 17/05/2011 09:42, Giorgio Spagnardi 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-tp2951642p2951642.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Greg Stasica
PaceMetrics Ltd.
T +353 1 8849921
PaceMetrics Limited is registered in Ireland as a private company limited by
shares, Registration No. 298243, Registered office: PaceMetrics House, East
Point Business Park, Dublin 3. This e-mail may contain confidential,
proprietary or privileged information. If you are not the intended recipient
(or have received this e-mail in error) please destroy this e-mail and notify
the sender immediately by telephoning +353 1 8184000. Any unauthorized copying,
disclosure or distribution of the material in this e-mail is strictly forbidden.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users