DMN Decision Table Output

A decision table can have one or more outputs, also called output clauses. An output clause defines the id, label, name and type of a decision table output.

An output clause is represented by an output element inside a decisionTable XML element.

<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" id="definitions" name="definitions" namespace="http://camunda.org/schema/1.0/dmn">
  <decision id="dish" name="Dish">
    <decisionTable id="decisionTable">
      <!-- ... -->
      <output id="output1" label="Dish" name="desiredDish" typeRef="string" />
      <!-- ... -->
    </decisionTable>
  </decision>
</definitions>

Output Id

The output id is a unique identifier of the decision table output. It is used by the Camunda Platform to reference the output in the history of evaluated decisions. Therefore, it is required by the Camunda DMN engine. It is set as the id attribute of the output XML element.

<output id="output1" label="Dish" name="desiredDish" typeRef="string" />

Output Label

An output label is a short description of the output. It is set on the output XML element in the label attribute. Note that the label is not required but recommended, since it helps to understand the decision.

<output id="output1" label="Dish" name="desiredDish" typeRef="string" />

Output Name

The name of the output is used to reference the value of the output in the decision table result. It is specified by the name attribute on the output XML element.

If the decision table has more than one output, then all outputs must have a unique name.

<output id="output1" label="Dish" name="desiredDish" typeRef="string" />

Output Type Definition

The type of the output clause can be specified by the typeRef attribute on the output XML element. After an output entry is evaluated by the DMN engine, it converts the result to the specified type. The supported types are listed in the User Guide.

<output id="output1" label="Dish" name="desiredDish" typeRef="string" />

Note that the type is not required but recommended, since it provides a type safety of the output values.

Additionally, the type can be used to transform the output value into another type. For example, transform the output value 80% of type String into a Double using a custom data type.

On this Page: