> ## 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.

# Decision Requirements Graph

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/drd.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=36e1ef5b93c38d05bd454183c2f9b18a" alt="Decision Requirements Graph" width="690" height="378" data-path="reference/dmn/drg/img/drd.png" />

A Decision Requirements Graph (DRG) models a domain of decision-making, showing the most important elements involved in it and the dependencies
between them. The elements modeled are [decisions], [input data], and [knowledge sources].

The visual representation of a DRG is called Decision Requirements Diagram (DRD).

In the XML a DRG is represented by the `definitions` element.

```xml theme={null}
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" id="dinnerDecisions" name="Dinner Decisions" namespace="http://camunda.org/schema/1.0/dmn">
  <decision id="dish" name="Dish">
    <!-- ... -->
  </decision>
  <decision id="beverages" name="Beverages">
    <!-- ... -->
  </decision>
</definitions>
```

## Decision Requirements Graph Name

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/drg-name.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=bb74e95645ae5c054e5a46f20255b1a4" alt="Decision Requirements Graph Name" width="390" height="244" data-path="reference/dmn/drg/img/drg-name.png" />

The name describes the DRG. It is set as the `name` attribute on the `definitions` element.

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

## Decision Requirements Graph Id

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/drg-id.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=ee133d3cab773f0be590b6b8916ec118" alt="Decision Requirements Graph Id" width="390" height="244" data-path="reference/dmn/drg/img/drg-id.png" />

The id is the technical identifier of the DRG. It is set in the `id` attribute on the `definitions` element.

Each DRG should have an unique id when it is [deployed] to ASEE Flow.
The engine uses the id as the decision requirements definition key of the deployed
`DecisionRequirementsDefinition`.

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

## Decision

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/decision.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=d9cf799b55a26bc62adddcfdd3eddb7d" alt="Decision" width="390" height="202" data-path="reference/dmn/drg/img/decision.png" />

A decision requirements graph can have one or more decisions. A decision has a [name] which is shown in the DRD and an [id]. The decision logic inside the decision must be either a [decision table] or a [decision literal expression].

A decision is represented by a `decision` element inside the `definitions` XML element.

```xml theme={null}
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" id="dish" name="Desired Dish" namespace="party">
  <decision id="beverages" name="Beverages">
    <decisionTable id="decisionTable">
    <!-- ... -->
    </decisionTable>
  </decision>
</definitions>
```

### Required Decisions

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/required-decision.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=4f8eb80d8358dfa8110c8584fbf4f7d0" alt="Required Decision" width="390" height="288" data-path="reference/dmn/drg/img/required-decision.png" />

A decision can have one or more required decisions which it depends on.

A required decision is represented by a `requiredDecision` element inside an `informationRequirement` XML element.
It has a `href` attribute and the value starts with `#` followed by the [decision id](/reference/dmn/decision-table#decision-id) of the required decision.

```xml theme={null}
<decision id="beverages" name="Beverages">
  <informationRequirement>
      <requiredDecision href="#dish" />
  </informationRequirement>
  <!-- ... -->
</decision>
```

## Input Data

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/input-data.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=4789f840790f5aac2756c2bf38d4554f" alt="Input Data" width="390" height="177" data-path="reference/dmn/drg/img/input-data.png" />

An input data denotes information used as an input by one or more decisions.

It is represented by an `inputData` element inside the `definitions` element.

```xml theme={null}
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" id="dinnerDecisions" name="Dinner Decisions" namespace="http://camunda.org/schema/1.0/dmn">
  <inputData id="guestsWithChildren" name="Guests with children?" />
  
  <decision id="beverages" name="Beverages">
    <informationRequirement>
      <requiredInput href="#guestsWithChildren" />
    </informationRequirement>
    <!-- ... -->
</definitions>
```

Note that an input data has no execution semantics and is ignored by the ASEE Flow DMN engine.

## Knowledge Source

<img src="https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/knowledge-source.png?fit=max&auto=format&n=EOmYJq0E21aelwRy&q=85&s=5878325bce520985704bebb8b752aa57" alt="Knowledge Source" width="390" height="259" data-path="reference/dmn/drg/img/knowledge-source.png" />

A knowledge source denotes an authority for a Decision.

It is represented by a `knowledgeSource` element inside the `definitions` element.

```xml theme={null}
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" id="dinnerDecisions" name="Dinner Decisions" namespace="http://camunda.org/schema/1.0/dmn">
  <knowledgeSource id="cookbook" name="Men's Cookbook" />
  
  <decision id="dish" name="Dish">
    <authorityRequirement>
      <requiredDecision href="#cookbook" />
    </authorityRequirement>
    <!-- ... -->
</definitions>
```

Note that a knowledge source has no execution semantics and is ignored by the ASEE Flow DMN engine.

[decisions]: #decision

[input data]: #input-data

[knowledge sources]: #knowledge-source

[decision table]: /reference/dmn/decision-table

[deployed]: /user-guide/process-engine/decisions/repository#deploying-a-decision

[decision literal expression]: /reference/dmn/decision-literal-expression

[id]: /reference/dmn/decision-table#decision-id

[name]: /reference/dmn/decision-table#decision-name
