# Associate the Routing Rule with a Contract

File routing uses 2 workflows that must be associated with a **New File** contract or with a **VirtualBox bind** contract.

### Associating the Rule with a New File Contract

To associate the rule with a **New File** contract, follow these steps:

1. Create the **New File Contract** of **Mediation** type.
2. Select the **Filerouting** Workflow.
3. In the **Source virtual path** panel, specify the **Actor**, **VFS,** and **VFS path** where the file routing workflow will be triggered.
4. In the **File Resource** fields, select the **filerouting-ext** and **filerouting-link**. These file resources must have been already configured – see [Set up File Resources](/data-mover-1.21/file-routing/configure-the-environment-in-data-mover/define-file-resources.md).
5. (Optional) When the file routing workflow is triggered, it can be specified that only the rules of a category (a subset of all defined rules) are applied.
6. In the **workareaPath** field, enter the shared path configured in the storage class (**/share/appl/filerouting**), followed by the **workarea** directory - see figure below. In the case of clusters, the same directory must be stored in the file system or directory shared by the STENGs in the cluster.

<figure><img src="/files/BNx8TtMf9lS5VJoe81lW" alt="" width="374"><figcaption></figcaption></figure>

7. In the VFS path field, enter the workarea virtual path defined in the VFS used by file routing.

<figure><img src="/files/tJn1J4ugL6MLZi8duNFL" alt="" width="563"><figcaption></figcaption></figure>

8. **Save** your Contract.

### Associating the Rule with a VirtualBox bind Contract

To associate the rule with a **VirtualBox bind** contract, follow these steps:

1. Create the **VirtualBox bind Contract** of **Mediation** type.
2. Select the **Filerouting** Workflow.
3. In the **Source virtual box,** select an existing **VirtualBox** or create a new one on which the file routing workflow will be triggered.
4. In the **Actor** field, enter the Actor of the file routing.
5. In the **VFS** field, enter the VFS of the file routing.
6. In the **VFS path** field, enter the workarea virtual path defined in the VFS used by file routing.
7. In the **File Resource** fields, select the **filerouting-ext** and **filerouting-link**. These file resources must have been already configured – see [Setup File Resources](/data-mover-1.21/file-routing/configure-the-environment-in-data-mover/define-file-resources.md).
8. (Optional) When the file routing workflow is triggered, it can be specified that only the rules of a **category** (a subset of all defined rules) are applied.
9. In the **workareaPath** field, enter the shared path configured in the storage class (**/share/appl/filerouting**). In the case of clusters, the same directory must be stored in the file system or directory shared by the STENGs in the cluster.

<figure><img src="/files/eOc20bdGcO9iLHyViKgj" alt="" width="563"><figcaption></figcaption></figure>


---

# 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.primeur.com/data-mover-1.21/file-routing/associate-the-routing-rule-with-a-contract.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.
