# Workflow execution

The `wf_client run` command can be used to execute a project.

Use `-p {PATH TO THE WORKFLOW PROJECT}` to run a project from another directory (it defaults to current working directory)&#x20;

## Single task-group

* You can specify the analysed task group using the `--task-group` flag.
* You can pass entries using `-e entry_name:entry_value`&#x20;
* You can pass metadata using `-m metadata_name:metadata_value`
* You can provide the path to your .env file if not previously sourced using the `--env` flag

To pass several entries/metadata, simply repeat the above syntax (multiple `-e ...`)

```shell
wf_client run  --task-group pm_ouvert_avant_travaux -e image_input:./pm-ouvert-avant-travaux.jpeg 

[INFO 16:54:13.961 client.py:37] engine initialization: 0.016 seconds
[INFO 16:54:13.968 client.py:37] workflow execution: 0.002 seconds
pm_ouvert_avant_travaux:
        [✓] pm-ouvert-avant-travaux-bool (bool): True
        [✓] pm-ouvert-avant-travaux-pres-etiquette-bool (bool): True
        [✓] pm-ouvert-avant-travaux-ocr-etiquette (str): 14222
```

{% hint style="info" %}
Add the flag **`-d`**` ``if you want the analysed image to be displayed with the drawn predicted regions`
{% endhint %}

## Multiple task-groups

You can run multiple task-groups with a shared environment (like a work-order) using an input file.

The format for the input file is:&#x20;

```json
[
    {
        "task_group": "pm_ouvert_avant_travaux",
        "entries": {
            "image_input": "./pm-ouvert-avant-travaux.jpeg"
        },
        "metadata": {
            "key": "value"
        }
    },
    {
        "task_group": "pm_ouvert_apres_travaux",
        "entries": {
            "image_input": "./pm-ouvert-apres-travaux.jpeg"
        }
    }
]
```

Then, running the workflow using

```bash
wf_client run -i inputs.json
```


---

# 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.deepomatic.com/platform-documentation/deepomatic-drive/configuring-visual-automation-applications/assembling-workflows/workflow-execution.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.
