# Rule Dependencies

Rule dependencies show the hierarchical and interconnected relationships between rules depending on each other. Rule dependencies are crucial for understanding the logical flow of rules and ensuring that they are applied correctly.

## Dependencies tree overview

The **rule dependency view** displays a hierarchical tree structure showing how rules are linked to one another. The rule you're currently viewing is at the top of the tree, and each rule listed beneath it represents a **direct dependency**—meaning the current rule relies on the output or execution of the rule immediately below it. This relationship continues down the structure, forming a chain of dependent rules. Understanding this hierarchy helps you trace how logic flows across multiple rules and ensures that all required inputs or results are properly defined before a rule is executed.

<figure><img src="/files/jB3RUuI64y5mTwTA175n" alt=""><figcaption><p>Dependency tree in rule settings</p></figcaption></figure>

Each dependency in the structure is a clickable link to get to the rule details and solve errors.

### Possible errors

* **Rule not found -** rule with the identifier (id, alias) was not found&#x20;
* **Duplicity id / alias -** more rules with the same identifier (id, alias)&#x20;
* **Circular dependency -**  rules depend on each other in a loop
* **Rule not published -** rule is not published and cant be solved

{% hint style="warning" %}
Rule dependencies won't be found when rules point to each other dynamically (e.g., using for loop).
{% endhint %}

Overall, a rule dependency tree acts as a preventive measure by providing an organized, visual representation of rule dependencies. This aids in maintaining the integrity of the rule-based system, reduces the likelihood of errors, and supports efficient development and troubleshooting processes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.decisionrules.io/doc/rules/common-rule-features/rule-dependencies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
