我们使用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);
答案 0 :(得分:0)
使用agendaeventlistner,您可以记录在Redhat BRMS中触发的规则
欲了解更多信息,请通过link解释如何使用agendaeventlistner。