[rules-users] Rule in decision table
Jeffrey Schneller
jeffrey.schneller at envisa.com
Fri Feb 19 16:18:04 EST 2010
I am trying to write a condition for a decision table and can't seem to
figure out how to do it.
I have a global variable called area. This is in sq. ft.
I have a fact called Item which has an attribute called weight. This is
in grams / sq. ft.
The Item comes from the attribute called value from a fact named Choice
where the sku attribute matches what is in the rule
I want to compare the (weight * area) to the parameter for the row. The
parameter is being passed in as lbs.
Here is what I tried for my three condition columns:
CONDITION
CONDITION
CONDITION
mm : Choice
sku
exists(Item(weight * area > ($param * 453.5924)) from mm.value)
exists(Item(weight * area <= ($param * 453.5924)) from mm.value)
This did not work. This will work if I remove the formula and just do
something like exists(Item(weight > $param) from mm.value). So the
syntax is correct except for the comparison that I want to do.
Any ideas on how to do this?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100219/a5157f44/attachment.html
More information about the rules-users
mailing list