public class DataDrivenTemplateExample
extends Object
This example shows how to use Data-driven rule templates. It assumes that the FeeScheduleRule
objects have been retrieved from a database using some form of Object-Relational Mapper (such
as Hibernate or Toplink).
An alternative is to use the ResultSetGenerator from the org.drools.templates.jdbc package, where you can use
vanilla JDBC to generate rules from (you just select the table names as the field named from the template) - this means no ORM
is required.
Some things to note:
- at the moment the templates require all parameters to come in a Strings
- any row that references a parameter that is empty will not be generated.