What's the best way for checking for errors when using the following
code for creating a kbase?
// ResourceChangeScanner
ResourceChangeScannerConfiguration sconf =
ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
sconf.setProperty("drools.resource.scanner.interval", "10");
ResourceFactory.getResourceChangeScannerService().configure(sconf);
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
// knowledge base
KnowledgeBaseConfiguration kbaseConf =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
kbaseConf.setOption(EventProcessingOption.STREAM);
kbaseConf.setOption(MBeansOption.ENABLED);
KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase(kbaseConf);
// knowledge agent
KnowledgeAgentConfiguration kagentConf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
kagentConf.setProperty("drools.agent.newInstance", "false");
KnowledgeAgent kagent =
KnowledgeAgentFactory.newKnowledgeAgent("AITS CEP Engine Agent", kbase,
kagentConf);
kagent.applyChangeSet(ResourceFactory.newClassPathResource(myFile));
// session
fSession = kbase.newStatefulKnowledgeSession();
Thank you.
Tina