从kieContainer创建时,KieBase没有KiePackage

时间:2017-06-09 13:27:52

标签: java drools jbpm kie

我创建了一个kieBase,但我没有在其中找到任何kiePackage。 Syso语句打印一个空列表。

kFile.write("D:/Test Rule/simple.drl",kieService.getResources().newReaderResource( new StringReader(new String(drlRuleData)) ));
    kiebuilder = kieService.newKieBuilder(kFile).buildAll();
                if (kiebuilder.getResults().hasMessages(Message.Level.ERROR)) {
                    logger.error("kiebuilder has errors", kiebuilder.getResults().getMessages(Message.Level.ERROR));
                    throw new CEHServiceException("Errors in drl file for Alert Classification",
                            kiebuilder.getResults().getMessages(Message.Level.ERROR).toString());
                }
                kieContainer = kieService.newKieContainer(kbuilder.getKieModule().getReleaseId());
                kieBase= kContainer.getKieBase();
System.out.println("The packages are : "+kbaseAcknowledgement.getKiePackages().toString());

0 个答案:

没有答案