I am currently exploring the evaluationListeners I can subscribe on the DMN execution.
I can register pre- and post listeners:
public abstract DmnEngineConfiguration customPreDecisionTableEvaluationListeners(List<DmnDecisionTableEvaluationListener> var1);
public abstract DmnEngineConfiguration customPostDecisionTableEvaluationListeners(List<DmnDecisionTableEvaluationListener> var1);
I did so and just log/debug when the DmnDecisionTableEvaluationListener#notify(DmnDecisionTableEvaluationEvent)
is called during execution of a DRG.
From what I see, the events passed pre and post are identical …
Digging deeper into the DecisionTableEvaluationHandler
I saw that listeners are notified via
// notify listeners
for (DmnDecisionTableEvaluationListener evaluationListener : evaluationListeners) {
evaluationListener.notify(evaluationResult);
}
// taken from
/**
* The list of decision table evaluation listeners of the configuration. Contains
* the pre, default and post decision table evaluation listeners. Is set during
* the build of an engine.
*
* @return the list of decision table evaluation listeners
*/
public List<DmnDecisionTableEvaluationListener> getDecisionTableEvaluationListeners() {
return decisionTableEvaluationListeners;
}
So effectivly, pre/post is ignored and everything I register is notified after the evaluation. Can you confirm?
This is a bug right? Why bother splitting pre/post when after all everything just ends up in one basket?