Execution of decision table is not giving expected result in version 7.14

Posted on

I am trying to execute attached decision table using below code snippet but I am not getting expected result.
On the other hand, when I execute the same decision table using drools version 5.5.0.final It is working as expected.

Code snippet of version 7.14

Resource dt
= ResourceFactory
.newClassPathResource("dtables/ExamplePolicyPricing_05.xls",
getClass());

KieServices kieServices = KieServices.Factory.get();
KieFileSystem kieFileSystem = kieServices.newKieFileSystem().write(dt);
KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem);
kieBuilder.buildAll();

KieRepository kieRepository = kieServices.getRepository();
ReleaseId krDefaultReleaseId = kieRepository.getDefaultReleaseId();
KieContainer kieContainer
= kieServices.newKieContainer(krDefaultReleaseId);
StatelessKieSession kieSession = kieContainer .newStatelessKieSession();

RuleSampleLogicData ruleData = new RuleSampleLogicData();
UserInfo info = new UserInfo();
ruleData.setUserInfo(info);
ruleData.setAge(21);
ruleData.setIncome(1200);
ruleData.getUserInfo().setUserName("sanjay");

List<Command<?>> cmds = new ArrayList>();
cmds.add(CommandFactory.newInsert(ruleData,"1"));
ExecutionResults results = kieSession.execute(CommandFactory.newBatchExecution(cmds));

System.out.println(results.getValue(String.valueOf(1)));

Note: I have attached required decision table and model classes.

Attachments