Hi All,
I'm trying to determine if it's possible to process arrays of data using Rule
Templates. An example of what I'm trying to accomplish.
Spreadsheet of rules, with one of the columns being valid colors. Valid colors
contains comma separated data and is variable length.
For example
It
In the spreadsheet (with class Country) you would have a column such as:
CONDITION
Country
name in ( $param )
Test whether name is one from a given set
Austria, Germany, Switzerland
France, Canada, Belgium
This is the generated rule:
rule InTest_18
when
$country:
Thanks for the reply Wolfgang.
I chose to use the template because I liked the idea of separating the rule
definition from the rule data. Just seemed intuitive to me. Overall, I'm new
to Drools, so not sure if that is the best choice or not.
I think your approach works if my spreadsheet has
If you are expanding the template with data taken from anywhere
you have the option of processing that data before you pass it
to the expander. Section 2.5.2., Expanding a Template, explains
how to do this. This is the option you have for implementing
specific processing.
The problem with data in
Thanks Wolfgang.
I think I see what you're saying. If I need to do any complex prep, simply
process it first, then build a collection of POJO objects for expansion by the
drools template.
I also understand what you're saying about spreadsheets. Most of this is just
proof of concept I'm