Hello all,
In my use case, I am planning on using decision tables to implement rules
that contain product information (product attributes - like product grade,
product style etc). I've managed to put together the spreadsheet and have
been successful in generating different set of rules (using rule templates)
from this spreadsheet. The spreadsheet with contain basic product
information that product fact will be matched against.
e.g. The spreadsheet will contain columns of product grade and product
styles that when translated into rules, the LHS would look something like
Product ( grade == "010", style == "515" )
Where the '010' and '515' would come from a spreadsheet (decision table)
that the user's provide.
Now here's the challenge. I need to also provide a means for the user to
validate the "010" and "515". The available product grade and styles
are
available in a database table. So I should be able to use that to build
second set of rules (templates). So I'm thinking, if there's a way to
convert the user supplied spreadsheet and make it a table of 'facts' of the
validation rules, I should be able to verify the value "010" "515"
against
the database.
Is that the best way to go about this ? If so, can someone please point me
to a way to load facts from a spreadsheet ? I have looked around and found
that there is a jxls project that allows loading of JavaBeans from values in
spreadsheet. But it requires xml files to be configured. I really like the
way rule templates work (by simply state substitution variables in the
template itself - thereby avoiding the whole need to configuration xml
files). I think if there's a way to load facts using templates from a
spreadsheet, I should be able to use that concept to validate the values in
my rules.
So is it possible to do the above ? Also is there a better way ?
Any insight would be appreciated.
Thanks in advance,
Gurvinder
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/How-to-validate-liter...
Sent from the Drools - User mailing list archive at
Nabble.com.