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

![](/files/-Mi69nDQ_Ht-KqUO4Ih_)

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

#### Rule mapping

Open the mapping by clicking on![](/files/-Mi6AwpISqoWZtzMGBsl), the window will appear, where you can create the mapping.

![](/files/-Mi6ClEC4KoYI3APdPLi)

* 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/rules/common-rule-features/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/rules/scripting-rule/call-embedded-rules-in-sr.md) method, and connect the Scripting Rule into the Rule Flow.
{% endhint %}

#### Example of correct mapping:

![](/files/-Mi6F1YLnBTkmN7kGLfo)

{% 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: 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/rule-flow/mapping.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.
