Hi
I am new in drools and in my project I would like to access rules in excel
file using drools 5.0
Please provide me the source code for how to access the rules in excel file.
I have done the following code
KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
DecisionTableConfiguration dtconf =
KnowledgeBuilderFactory.newDecisionTableConfiguration();
dtconf.setInputType( DecisionTableInputType.XLS );
dtconf.setWorksheetName("Tables");
kBuilder.add(ResourceFactory.newFileResource("TeamAllocationExample.xls"),
ResourceType.DTABLE, dtconf);
KnowledgeBuilderErrors errors = kBuilder.getErrors();
if (errors.size() > 0)
{
for (KnowledgeBuilderError error: errors) {
System.out.println(error);
}
throw new IllegalArgumentException("Could not parse knowledge.");
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kBuilder.getKnowledgePackages());
return kbase;
How could I use the POJO for accessing the rule?
Please help me.
Thanks in advance
Sanjib
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Request-help-for-sour...
Sent from the Drools - Dev mailing list archive at
Nabble.com.