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.