无法从Kiesession中的GuidedDecisionTable资产触发AgendaGroup的规则

时间:2019-04-02 19:05:16

标签: drools drools-kie-workbench

我在KieWorkBench中添加了GuidedDecisionTable,已经使用KieContainer加载了KBase,能够查看该KBase下的包和规则,但是在触发规则时,它始终返回null

我已经在调试模式下检查了流程,int getNextFocus()调用DefaultAgenda始终返回null,它正在检查scheduleGroup.isEmpty(),即使AgendaGroup中都有规则,MyAgendaGroup和MAIN Agendagroup仍返回空。 / p>

KieResources资源= kieServices.getResources();

String url = upgradeServiceUrl.getValue();

UrlResource urlResource =(UrlResource)resources.newUrlResource(url); urlResource.setUsername(“ ****”); urlResource.setPassword(“ ****”);

urlResource.setBasicAuthentication(“ enabled”);

InputStream流= urlResource.getInputStream();

KieRepository存储库= kieServices.getRepository();

KieModule k = repo.addKieModule(resources.newInputStreamResource(stream));

kieContainer = kieServices.newKieContainer(k.getReleaseId());

KieSession会话= kieContainer.newKieSession();

session.getAgenda()。getAgendaGroup(“ MyAgendaGroup”)。setFocus();

FactHandle句柄= session.insert(DTO);

session.fireAllRules();

session.delete(handle);

session.dispose();

0 个答案:

没有答案