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

![Decision Requirements Graph](https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/drd.png?fit=max\&auto=format\&n=EOmYJq0E21aelwRy\&q=85\&s=36e1ef5b93c38d05bd454183c2f9b18a)

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

![Decision Requirements Graph Name](https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/drg-name.png?fit=max\&auto=format\&n=EOmYJq0E21aelwRy\&q=85\&s=bb74e95645ae5c054e5a46f20255b1a4)

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

![Decision Requirements Graph Id](https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/drg-id.png?fit=max\&auto=format\&n=EOmYJq0E21aelwRy\&q=85\&s=ee133d3cab773f0be590b6b8916ec118)

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

![Decision](https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/decision.png?fit=max\&auto=format\&n=EOmYJq0E21aelwRy\&q=85\&s=d9cf799b55a26bc62adddcfdd3eddb7d)

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

![Required Decision](https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/required-decision.png?fit=max\&auto=format\&n=EOmYJq0E21aelwRy\&q=85\&s=4f8eb80d8358dfa8110c8584fbf4f7d0)

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](https://docs.aseeflow.org/1.x/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

![Input Data](https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/input-data.png?fit=max\&auto=format\&n=EOmYJq0E21aelwRy\&q=85\&s=4789f840790f5aac2756c2bf38d4554f)

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

![Knowledge Source](https://mintcdn.com/aseeflow/EOmYJq0E21aelwRy/reference/dmn/drg/img/knowledge-source.png?fit=max\&auto=format\&n=EOmYJq0E21aelwRy\&q=85\&s=5878325bce520985704bebb8b752aa57)

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]: https://docs.aseeflow.org/reference/dmn/decision-table

[deployed]: https://docs.aseeflow.org/user-guide/process-engine/decisions/repository.md#deploying-a-decision

[decision literal expression]: https://docs.aseeflow.org/reference/dmn/decision-literal-expression

[id]: https://docs.aseeflow.org/reference/dmn/decision-table#decision-id

[name]: https://docs.aseeflow.org/reference/dmn/decision-table#decision-name


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.