Chapter 5. DMN support in Red Hat Decision Manager Red Hat Decision Manager provides runtime support for DMN 1.1, 1.2, 1.3, and 1.4 models at conformance level 3, and design support for DMN 1.2 models at conformance level 3. You can integrate DMN models with your Red Hat Decision Manager decision services in several ways: Design your DMN models directly in Business Central using the DMN designer. Import DMN files into your project in Business Central ( Menu Design Projects Import Asset ). Any DMN 1.1 and 1.3 models (do not contain DMN 1.3 features) that you import into Business Central, open in the DMN designer, and save are converted to DMN 1.2 models. Package DMN files as part of your project knowledge JAR (KJAR) file without Business Central. The following table summarizes the design and runtime support for each DMN version in Red Hat Decision Manager: Table 5.1. DMN support in Red Hat Decision Manager DMN version DMN engine support DMN modeler support Execution Open Save DMN 1.1 DMN 1.2 DMN 1.3 DMN 1.4 In addition to all DMN conformance level 3 requirements, Red Hat Decision Manager also includes enhancements and fixes to FEEL and DMN model components to optimize the experience of implementing DMN decision services with Red Hat Decision Manager. From a platform perspective, DMN models are like any other business asset in Red Hat Decision Manager, such as DRL files or spreadsheet decision tables, that you can include in your Red Hat Decision Manager project and deploy to KIE Server in order to start your DMN decision services. For more information about including external DMN files with your Red Hat Decision Manager project packaging and deployment method, see Packaging and deploying an Red Hat Decision Manager project . You can design a new DMN decision service using a Red Hat build of Kogito microservice as an alternative for the cloud-native capabilities of DMN decision services. You can migrate your DMN service to a Red Hat build of Kogito microservice. For more information about migrating to Red Hat build of Kogito microservices, see Migrating to Red Hat build of Kogito microservices . 5.1. Configurable DMN properties in Red Hat Decision Manager Red Hat Decision Manager provides the following DMN properties that you can configure when you execute your DMN models on KIE Server or on your client application. You can configure some of these properties using the kmodule.xml file in your Red Hat Decision Manager project when you deploy your project on KIE Server. org.kie.dmn.strictConformance When enabled, this property disables by default any extensions or profiles provided beyond the DMN standard, such as some helper functions or enhanced features of DMN 1.2 backported into DMN 1.1. You can use this property to configure the decision engine to support only pure DMN features, such as when running the DMN Technology Compatibility Kit (TCK). Default value: false org.kie.dmn.runtime.typecheck When enabled, this property enables verification of actual values conforming to their declared types in the DMN model, as input or output of DRD elements. You can use this property to verify whether data supplied to the DMN model or produced by the DMN model is compliant with what is specified in the model. Default value: false org.kie.dmn.decisionservice.coercesingleton By default, this property makes the result of a decision service defining a single output decision be the single value of the output decision value. When disabled, this property makes the result of a decision service defining a single output decision be a context with the single entry for that decision. You can use this property to adjust your decision service outputs according to your project requirements. Default value: true org.kie.dmn.profiles.USDPROFILE_NAME When valorized with a Java fully qualified name, this property loads a DMN profile onto the decision engine at start time. You can use this property to implement a predefined DMN profile with supported features different from or beyond the DMN standard. For example, if you are creating DMN models using the Signavio DMN modeller, use this property to implement features from the Signavio DMN profile into your DMN decision service. org.kie.dmn.runtime.listeners.USDLISTENER_NAME When valorized with a Java fully qualified name, this property loads and registers a DMN Runtime Listener onto the decision engine at start time. You can use this property to register a DMN listener in order to be notified of several events during DMN model evaluations. To configure this property when deploying your project on KIE Server, modify this property in the kmodule.xml file of your project. This approach is helpful when the listener is specific to your project and when the configuration must be applied in KIE Server only to your deployed project. <kmodule xmlns="http://www.drools.org/xsd/kmodule"> <configuration> <property key="org.kie.dmn.runtime.listeners.mylistener" value="org.acme.MyDMNListener"/> </configuration> </kmodule> To configure this property globally for your Red Hat Decision Manager environment, modify this property using a command terminal or any other global application configuration mechanism. This approach is helpful when the decision engine is embedded as part of your Java application. org.kie.dmn.compiler.execmodel When enabled, this property enables DMN decision table logic to be compiled into executable rule models during run time. You can use this property to evaluate DMN decision table logic more efficiently. This property is helpful when the executable model compilation was not originally performed during project compile time. Enabling this property may result in added compile time during the first evaluation by the decision engine, but subsequent compilations are more efficient. Default value: false 5.2. Configurable DMN validation in Red Hat Decision Manager By default, the kie-maven-plugin component in the pom.xml file of your Red Hat Decision Manager project uses the following <validateDMN> configurations to perform pre-compilation validation of DMN model assets and to perform DMN decision table static analysis: VALIDATE_SCHEMA : DMN model files are verified against the DMN specification XSD schema to ensure that the files are valid XML and compliant with the specification. VALIDATE_MODEL : The pre-compilation analysis is performed for the DMN model to ensure that the basic semantic is aligned with the DMN specification. ANALYZE_DECISION_TABLE : DMN decision tables are statically analyzed for gaps or overlaps and to ensure that the semantic of the decision table follows best practices. You can modify the default DMN validation and DMN decision table analysis behavior to perform only a specified validation during the project build, or you can disable this default behavior completely, as shown in the following examples: Default configuration for DMN validation and decision table analysis <plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <validateDMN>VALIDATE_SCHEMA,VALIDATE_MODEL,ANALYZE_DECISION_TABLE</validateDMN> </configuration> </plugin> Configuration to perform only the DMN decision table static analysis <plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <validateDMN>ANALYZE_DECISION_TABLE</validateDMN> </configuration> </plugin> Configuration to perform only the XSD schema validation <plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <validateDMN>VALIDATE_SCHEMA</validateDMN> </configuration> </plugin> Configuration to perform only the DMN model validation <plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <validateDMN>VALIDATE_MODEL</validateDMN> </configuration> </plugin> Configuration to disable all DMN validation <plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <validateDMN>disable</validateDMN> </configuration> </plugin> Note If you enter an unrecognized <validateDMN> configuration flag, all pre-compilation validation is disabled and the Maven plugin emits related log messages.

Commands:
-Dorg.kie.dmn.strictConformance=true
-Dorg.kie.dmn.runtime.typecheck=true
-Dorg.kie.dmn.decisionservice.coercesingleton=false
-Dorg.kie.dmn.profiles.signavio=org.kie.dmn.signavio.KieDMNSignavioProfile
<kmodule xmlns="http://www.drools.org/xsd/kmodule"> <configuration> <property key="org.kie.dmn.runtime.listeners.mylistener" value="org.acme.MyDMNListener"/> </configuration> </kmodule>
-Dorg.kie.dmn.runtime.listeners.mylistener=org.acme.MyDMNListener
-Dorg.kie.dmn.compiler.execmodel=true
<plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <validateDMN>VALIDATE_SCHEMA,VALIDATE_MODEL,ANALYZE_DECISION_TABLE</validateDMN> </configuration> </plugin>
<plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <validateDMN>ANALYZE_DECISION_TABLE</validateDMN> </configuration> </plugin>
<plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <validateDMN>VALIDATE_SCHEMA</validateDMN> </configuration> </plugin>
<plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <validateDMN>VALIDATE_MODEL</validateDMN> </configuration> </plugin>
<plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <validateDMN>disable</validateDMN> </configuration> </plugin>