Hi
I've got the following rule:
when
$sale : Sale( amount > 300 )
then
modify($sale) { amount = 300; }
end
First problem: I don't like putting the constant value "300" two times in
my
rule.
Second problem: amount is a BigDecimal. I read that mvel2 supports
BigDecimal literals like 300.00B, but drools won't compile this.
An ideal solution would look like something like this:
when
$maxAmount : 300.00B
$sale : Sale( amount > $maxAmount )
then
modify($sale) { amount = $maxAmount; }
end
1. Is it possible to attribute values to a variable?
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).
Evert
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Constants-and-BigDeci...
Sent from the Drools - User mailing list archive at
Nabble.com.