[rules-users] Constants and BigDecimals
Evert Penninckx
evert.penninckx at gmail.com
Wed Oct 13 09:57:06 EDT 2010
Evert Penninckx wrote:
>
> 2. If not, is it possible to use mvel's BigDecimal support? Because
> amount > 300.00B says a lot more than eval(amount.compareTo(new
> BigDecimal("300.00")) > 0).
>
For the record. I found out that when using mvel as dialect, you can use the
mvel2 BigDecimal operators and literals inside an inline eval.
This means thatSale(eval(amount.compareTo(new BigDecimal("300.00")) > 0)).
can be rewritten as Sale(eval(amount > 300.00B)) which is already much more
readable.
-E
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Constants-and-BigDecimals-tp1664852p1694619.html
Sent from the Drools - User mailing list archive at Nabble.com.
More information about the rules-users
mailing list