My Spring Boot app connects to the Camunda BPMN & DMN. When a user clicks on Approve/Reject button in UI screen, a REST call triggers one BPMN workflow (in Camunda Spring Boot app) which internally triggers a DMN to find the output based on some business rules mapped in DMN input columns. We need to find the exact matching rules details like list of matching rules - input values, output values, matching rule ID, etc.
There are no inbuilt methods present in process engine and dmn engine and hence need to know if there is a way to manually configure such capabilities to the default process engine that comes as part of Spring Boot auto-configuration.
Camunda version: 7.13.0
In a Spring Boot app, if we have these dependencies in pom.xml - camunda-bpm-spring-boot-starter, camunda-bpm-spring-boot-starter-webapp, camunda-bpm-spring-boot-starter-rest, a default Process Engine will be auto-configured during the startup of the Spring Boot app. But this Process Engine does not by default enable the Rule details. So we configure a custom Process Engine plugin which will be applied on top of the default Process Engine in order to get the matching rule details every time DMN is hit.
Customize Process Engine:
Our
CustomProcessEnginePlugin
will extendAbstractCamundaConfiguration
andoverride postInit()
method. ThispostInit()
method adds aDmnDecisionTableEvaluationListener
. This listner triggers an event everytime DMN is hit with matching rule and hasnotify()
method with event details which contains all the DMN details likedmnID
and matching rules detail.There is another way to get the matching rule details - by implementing
ProcessEnginePlugin
andoverriding postProcessEngineBuild()
andpreInit()
methods instead of extendingAbstractCamundaConfiguration
andoverriding postInit()
method as above.