decision tree drools using spring boot code example
Example 1: decision tree drools using spring boot
public class Customer {
private CustomerType type;
private int years;
private int discount;
public enum CustomerType {
INDIVIDUAL,
BUSINESS;
}
}
Example 2: decision tree drools using spring boot
KieServices kieServices = KieServices.Factory.get();
Example 3: decision tree drools using spring boot
Resource dt
= ResourceFactory
.newClassPathResource("com/baeldung/drools/rules/Discount.xls",
getClass());
KieFileSystem kieFileSystem = kieServices.newKieFileSystem().write(dt);