Reputation: 51
We are using Redhat BRMS 6.4 for our application which is developed using Java. For better logging capabilities, I was thinking of logging the rules fired in Redhat BRMS. Is there a way we can get back the rules fired in BRMS back as response.
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);
Upvotes: 0
Views: 89
Reputation: 313
Using agendaeventlistner you can log the rules fired in Redhat BRMS
For more info,pleasego through the link which explain that how to use agendaeventlistner.
Upvotes: 0