> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aseeflow.org/llms.txt
> Use this file to discover all available pages before exploring further.

# DMN Decision Table Rule

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/decision-table/img/rule.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=bdf206ca24eea0559a88b6c485fe09be" alt="Rule" width="2581" height="727" data-path="reference/dmn/decision-table/img/rule.png" />

A decision table can have one or more rules. Each rule contains input and
output entries. The input entries are the condition and the output entries the
conclusion of the rule. If each input entry (condition) is satisfied, then the
rule is satisfied and the decision result contains the output entries
(conclusion) of this rule.

A rule is represented by a `rule` element inside a `decisionTable` XML element.

```xml theme={null}
<?xml version="1.0" encoding="UTF-8"?>
<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">
      <!-- ... -->
      <rule id="rule2-950612891-2">
        <inputEntry id="inputEntry21">
          <text>"Winter"</text>
        </inputEntry>
        <inputEntry id="inputEntry22">
          <text><![CDATA[<= 8]]></text>
        </inputEntry>
        <outputEntry id="outputEntry2">
          <text>"Roastbeef"</text>
        </outputEntry>
      </rule>
      <!-- ... -->
    </decisionTable>
  </decision>
</definitions>
```

## Input Entry (Condition)

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/decision-table/img/input-entry.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=d7228638fd5cadd17d58acf5f46e53f6" alt="Input Entry" width="2581" height="736" data-path="reference/dmn/decision-table/img/input-entry.png" />

A rule can have one or more input entries, which are the conditions of the rule.
Each input entry contains an expression in a `text` element as child of an
`inputEntry` XML element.

The input entry is satisfied when the evaluated expression returns `true`.

```xml theme={null}
<inputEntry id="inputEntry41">
  <text>"Spring"</text>
</inputEntry>
```

### Expression Language of an Input Entry

The expression language of the input entry can be specified by the
`expressionLanguage` attribute on the `inputEntry` XML element. The supported
expression languages are listed in the [User Guide][supported EL].

```xml theme={null}
<inputEntry id="inputEntry41"
            expressionLanguage="juel">
  <text>cellInput == "Spring"</text>
</inputEntry>
```

If no expression language is set then the global expression
language, which is set on the `definitions` XML element, is used.

```xml theme={null}
<definitions id="definitions"
             name="definitions"
             xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/"
             expressionLanguage="groovy"
             namespace="http://camunda.org/schema/1.0/dmn">
  <!-- ... -->
</definitions>
```

In case no global expression language is set, the default expression language
is used instead. The default expression language for input entries is [FEEL].
Please refer to the [User Guide][default EL] to read more about expression
languages.

## Output Entry (Conclusion)

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/decision-table/img/output-entry.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=e49a986d9eb658914c4c03ca8889b260" alt="Output Entry" width="2581" height="736" data-path="reference/dmn/decision-table/img/output-entry.png" />

A rule can have one or more output entries, which are the conclusions of the
rule. Each output entry contains an expression in a `text` element as child of
an `outputEntry` XML element.

```xml theme={null}
<outputEntry id="outputEntry4">
  <text>"Steak"</text>
</outputEntry>
```

### Expression Language of an Output Entry

The expression language of the expression can be specified by the
`expressionLanguage` attribute on the `outputEntry` XML element. The supported
expression languages are listed in the [User Guide][supported EL].

```xml theme={null}
<outputEntry id="outputEntry4"
            expressionLanguage="groovy">
  <text>"Steak"</text>
</outputEntry>
```

If no expression language is set then the global expression
language, which is set on the `definitions` XML element, is used.

```xml theme={null}
<definitions id="definitions"
             name="definitions"
             xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/"
             expressionLanguage="groovy"
             namespace="http://camunda.org/schema/1.0/dmn">
  <!-- ... -->
</definitions>
```

In case no global expression language is set, the default expression language
is used instead. The default expression language for output entries is JUEL.
Please refer to the [User Guide][default EL] to read more about expression
languages.

## Empty Entries

### Empty Input Entry

In case an input entry is irrelevant for a rule, the expression is empty, which
is always satisfied.

```xml theme={null}
<inputEntry id="inputEntry41">
  <text/>
</inputEntry>
```

If FEEL is used as expression language, then an empty input entry is represented
by a `-`. Otherwise, the expression is empty.

### Empty Output Entry

If the output entry is empty, then the output is ignored and not part of the
decision table result.

```xml theme={null}
<outputEntry id="outputEntry4">
  <text/>
</outputEntry>
```

### Both Entries Empty

In case of a rule has an empty input and output entry, the outcome of evaluation
will be determined with precedence of the empty input outcome.

## Description

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/decision-table/img/description.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=a175e1a6bef0364be3fb7c6d4745ef80" alt="Description" width="2581" height="736" data-path="reference/dmn/decision-table/img/description.png" />

A rule can be annotated with a description that provides additional
information. The description text is set inside the `description` XML element.

```xml theme={null}
<rule id="rule4">
  <description>Save money</description>
  <!-- ... -->
</rule>
```

[supported EL]: /user-guide/dmn-engine/expressions-and-scripts#supported-expression-languages

[default EL]: /user-guide/dmn-engine/expressions-and-scripts#default-expression-languages

[FEEL]: /reference/dmn/feel
