Red Hat Training

A Red Hat training course is available for Red Hat Process Automation Manager

Chapter 3. DMN model example

DMN defines an XML schema that enables DMN models to be used between different DMN authoring platforms. The DMN specification enables multiple software platforms to work with the same file for authoring, testing, and production execution. You must use a third-party authoring platform such as Trisotech or Signavio if you require visual authoring capabilities.

The following decision requirements diagram (DRD) example demonstrates a classification-type decision for the age categories of movie ticket purchases. This basic example demonstrates good form by creating classifications to avoid repeated calculations so that this mini-decision can be an input for other decisions.

Figure 3.1. Decision requirements diagram for the age classification decision

dmn age classification drd

This example consists of a single numeric input value (Age), and produces a string output (AgeClassification). The inner workings of the AgeClassification decision is a basic table:

Figure 3.2. Decision table for the age classification decision

dmn age classification decision table

This table assigns a value to the AgeClassification output value using simple FEEL expressions to determine ranges on the age value. This decision model was created in the Trisotech DMN Authoring environment.

The following output is the XML source of this decision model:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<semantic:definitions xmlns:semantic=""
                      namespace="" 1
                      name="dmn-movieticket-ageclassification" 2
  <semantic:inputData displayName="Age" id="_1" name="Age">
    <semantic:variable id="_2" name="Age" typeRef="feel:number"/>
  <semantic:decision displayName="AgeClassification" id="_3" name="AgeClassification">
    <semantic:variable id="_4" name="AgeClassification" typeRef="feel:string"/>
      <semantic:requiredInput href="#_1"/>
    <semantic:decisionTable hitPolicy="UNIQUE" id="_5" outputLabel="AgeClassification">
      <semantic:input id="_6">
        <semantic:inputExpression typeRef="feel:number">
      <semantic:output id="_7"/>
      <semantic:rule id="_8">
        <semantic:inputEntry id="_9">
          <semantic:text>&lt; 13</semantic:text>
        <semantic:outputEntry id="_10">
      <semantic:rule id="_11">
        <semantic:inputEntry id="_12">
        <semantic:outputEntry id="_13">
      <semantic:rule id="_14">
        <semantic:inputEntry id="_15">
          <semantic:text>&gt;= 65</semantic:text>
        <semantic:outputEntry id="_16">
Model namespace
Model name

This basic file captures enough information to encapsulate the business logic, the input and outputs of the overall decision, and enough detail to enable software tools to graphically represent the relationships consistently.

The namespace and name attributes of the root definitions tag uniquely identify this decision model. Like much XML, the namespace value appears as a unique URL associated with the organization or individual that authored the document.