use of org.drools.examples.templates.FeeScheduleRule in project drools by kiegroup.
the class DataDrivenTemplateExample method testCompiler.
public void testCompiler() {
ArrayList<FeeScheduleRule> rules = new ArrayList<FeeScheduleRule>();
FeeScheduleType standard = new FeeScheduleType("STANDARD");
FeeScheduleType flat = new FeeScheduleType("FLAT");
ProductType sblc = new ProductType("SBLC");
ProductType rrc = new ProductType("RRC");
ActivityType iss = new ActivityType("ISS");
ActivityType osx = new ActivityType("OSX");
FeeType commission = new FeeType("Commission");
FeeType postage = new FeeType("Postage");
FeeType telex = new FeeType("Telex");
rules.add(createRule(1, flat, "", sblc, iss, commission, "Party 1", "USD", "", 0, 750, true));
rules.add(createRule(2, standard, "Entity Branch 1", rrc, iss, commission, "", "YEN", "", 0, 1600, false));
rules.add(createRule(3, standard, "", sblc, iss, postage, "", "YEN", "", 0, 40, true));
rules.add(createRule(4, flat, "", sblc, osx, telex, "", "YEN", "<", 30000, 45, false));
TestDataProvider tdp = new TestDataProvider(rules);
final DataProviderCompiler converter = new DataProviderCompiler();
final String drl = converter.compile(tdp, getTemplate());
System.out.println(drl);
}
Aggregations