我们的应用程序使用的是Redhat BRMS 6.4,它是使用Java开发的。为了更好地记录日志功能,我正在考虑记录Redhat BRMS中触发的规则。我们有没有办法把在BRMS中激发的规则作为响应返回。
KieCommands commandsFactory = KieServices.Factory.get().getCommands();
String className = getClassNameForRuleEngine(t);
commands.add(commandsFactory.newInsert(t, className));
commands.add(commandsFactory.newFireAllRules());
commands.add(commandsFactory.newGetObjects(GET_DEFAULT_OBJECT_NAME));
BatchExecutionCommand batchExecution = commandsFactory.newBatchExecution(commands, "ksession");
RuleServicesClient ruleServicesClient = kieServicesClient.getServicesClient(RuleServicesClient.class);
ServiceResponse<ExecutionResults> response = ruleServicesClient.executeCommandsWithResults(containerId,
batchExecution);发布于 2018-01-14 22:18:47
使用agendaeventlistner,您可以记录Redhat BRMS中触发的规则
有关更多信息,请通过link了解如何使用agendaeventlistner。
https://stackoverflow.com/questions/48193872
复制相似问题