The configuration of the DMN engine is a part of the process engine configuration. It depends on whether you use an application managed or a shared, container managed process engine. Please refer to the Process Engine Bootstrapping for details.

This section shows how to configure the DMN engine:

Configure the DMN Engine using Java API

First, you need to create a ProcessEngineConfiguration object for the process engine and a DmnEngineConfiguration object for the DMN engine. Now you can configure the DMN engine using the DmnEngineConfiguration object. When you are done, set the object on the ProcessEngineConfiguration and call buildProcessEngine() to create the process engine.

  1. // create the process engine configuration
  2. ProcessEngineConfigurationImpl processEngineConfiguration = // ...
  3. // create the DMN engine configuration
  4. DefaultDmnEngineConfiguration dmnEngineConfiguration = (DefaultDmnEngineConfiguration)
  5. DmnEngineConfiguration.createDefaultDmnEngineConfiguration();
  6. // configure the DMN engine ...
  7. // e.g. set the default expression language for input expressions to `groovy`
  8. dmnEngineConfiguration.setDefaultInputExpressionExpressionLanguage("groovy");
  9. // set the DMN engine configuration on the process engine configuration
  10. processEngineConfiguration.setDmnEngineConfiguration(dmnEngineConfiguration);
  11. // build the process engine which includes the DMN engine
  12. processEngineConfiguration.buildProcessEngine();

Configure the DMN Engine using Spring XML

Follow the instructions to create a base camunda.cfg.xml XML configuration for the process engine.

Add a new configuration bean of class org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration. Configure the DMN engine using the bean and set it as dmnEngineConfiguration property on the processEngineConfiguration bean.

  1. <beans xmlns="http://www.springframework.org/schema/beans"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
  4. <bean id="processEngineConfiguration"
  5. class="org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration">
  6. <property name="dmnEngineConfiguration">
  7. <bean class="org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration">
  8. <!-- configure the DMN engine ... -->
  9. <!-- e.g. set the default expression language for input expressions to `groovy` -->
  10. <property name="defaultInputExpressionExpressionLanguage" value="groovy" />
  11. </bean>
  12. </property>
  13. </bean>
  14. </beans>

原文: https://docs.camunda.org/manual/7.9/user-guide/process-engine/decisions/configuration/