我们将 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);