Hi,
Am trying to model some rules using drools templates.
Currently the data inputs to rule templates are only strings, I need to be able to define a compound value restriction set for the rule i.e if fact attribute is present in a list. (see sample below).
e.g.
template header
dealers
template "my-template"
rule "my-rule"
when
$order : Order(dealer in (@{dealers}))
then
System.out.println("Order is present in dealer"
end
end template
I am trying to compile this template by passing it an Object which has a dealers attribute which is essentially a List<String>. Short of creating a function which sends back a comma separated representation of the list, does the drools compiler provide any option to send a list.