> For the complete documentation index, see [llms.txt](https://docs.decisionrules.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decisionrules.io/doc/v1/rule-flow/mapping.md).

# Rule Flow Mapping

## What is the Rule Flow mapping?

To make the rule flow work, the rules must be mapped. By mapping, we decide which inputs should go to which outputs of the certain rules.

For an unmapped rule, a yellow border and a yellow exclamation mark appear in the right corner, as shown on the picture below:

![](https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/7cWPi07tRZBNx5jAX8Er/unmapped.PNG)

In this case, the **rule** and the **output** box are not mapped.

#### Rule mapping

Open the mapping by clicking on![](https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/QdVivCZPOKKNccuSCVxV/dataMapping.PNG), the window will appear, where you can create the mapping.

![](https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/OPryrgB8kT9ynGE1jhsC/mapping.PNG)

* In the **global variable**, select the rule you want to map, and in the output select the exact outputs you want to get mapped on the target input.

{% hint style="danger" %}
Please note that Decision Tables called from within Rule Flows are always called with the "First Match" strategy. Read more about strategies [here](/doc/v1/other/execution-strategy.md).

If you need the table to return an array of values you can call the table from a Scripting rule using the [DR.Solve()](/doc/v1/scripting-rules/call-embedded-rules-in-sr.md) method, and connect the Scripting Rule into the Rule Flow.
{% endhint %}

#### Example of correct mapping:

![](https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/fOsgpOSQF6ONkOINBX2T/correctMapping.PNG)

{% hint style="success" %}
Notice that the mapped outputs are from various global variables, even from the input box itself. It means you can use any of the rules in the rule flow to be mapped not only the parent/child rules.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decisionrules.io/doc/v1/rule-flow/mapping.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
