I’m currently trying to not only get the output result from my DmnDecisionTableResult but get the DMN engine to return the rule this output result belongs to.
My guess is it is possible to return it, I am just not looking at the right place.
The DMN Online Simulator automatically highlights the correct rule which was found and when I fooled around with https://dmn.lab.camunda.com/ I can see a rule response, which is exactly what I am looking for.
you can get the information from the history. When a decision is evaluated within Camunda BPM then the history is written. It contains which rules are matched and more.
I solved it by implementing the DmnDecisionTableEvaluationListener and registered to the dmn configuration and built along with process engine.
public class PostDecisionTableEvaluationListener implements DmnDecisionTableEvaluationListener {
@Override
public void notify(DmnDecisionTableEvaluationEvent decisionTableEvaluationEvent) {
//implementation logic to process the decision inputs, output or matched rule, etc.
}
}
Now the problem is, I want to execute this evaluation listener only for certain decision tables. How can we achieve that? Currently I configured as part of the DMN engine configuration, so it applied for all the decision tables.