# Business scenario

This is an example of the use of file routing associated with a Contract, where a file is zipped and copied to a specific virtual path.

Let’s start by creating a rule that acts on the testAcademy1.txt file.

![](https://files.readme.io/182205c0d6695afaf77e86fd115c76e1ba9f4e04110139253298414e08be9e56-image.png)

The file will be zipped, and it will keep its original filename without extension. Its new name will be testAcademy1.zip.

![](https://files.readme.io/bc6daf16fdb1047c2e333288a954ccb79e933a6954bee159ee9b2d0af545bd29-image.png)

As output, we want the file to be copied to a VFS called filerouting-vfs, path /output.

![](https://files.readme.io/64143a7544d6401d9c483a402c1a9b21166d74b14a9fc9bb4be9d6afa7f45dee-image.png)

By saving our rule, it will appear on the main page:

![](https://files.readme.io/fce913c874f354366c89bea1d702d4e614f9550e8f41f36ce8f7fba10db1d559-image.png)

We now configure a Contract of type **New File** to which we associate the file routing workflow.\
It is important to note that in the **Source virtual path** section, the **Actor**, **VFS** and **VFS path** must be those that trigger the new file contract for file routing.\
To simplify, in this example, a virtual path configured in file routing VFS is used.

![](https://files.readme.io/2ed158f959e052c7c65e8b7bfbd06a90ad6690efe3cb32651e0a202ce01e26a9-image.png)

Also the **Actor** and **File resources** must be those of file routing:

![](https://files.readme.io/a2995b24c12985f4d7e47dc4adf9198f7723aeb9541790e417d068645cfd2752-image.png)

The **workareaPath** must be the shared path configured in the storage class:

<figure><img src="/files/1bhHzGVPoflsZRmwGohL" alt="" width="420"><figcaption></figcaption></figure>

The **Actor**, **VFS** and **VFS path** of the **workareaPath virtual path** must be those of the file routing.

![](https://files.readme.io/297d0a5a02a501fd0304658d24b38ccb8d92b123f93e164034ea7cd9dc6634f5-image.png)

Once the file enters the system, the rule will be applied and the testAcademy1.zip file will be created.\
Going to **Monitoring** → **Jobs**, we can see that the AcademyRuleContractNewFile Contract is COMPLETED.

![](https://files.readme.io/e35d5a786fb94a569037361230d323e7a1f13e9a43e7c3a9f7ffde71fcfcb52b-image.png)

Going to **Monitoring** → **Search File by Actor**, we can see the testAcademy1.zip file in the **output** virtual path of the VFS.

![](https://files.readme.io/ff36236fdd36e8610ac44ff36d91b48e703e3848b864e7f3a41edd02fce41322-image.png)


---

# 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/business-scenario.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.
