# Updating the process flow version deployed in a virtual environment

## Introduction

Having deployed a process flow to a virtual environment for the first time, any subsequent updates must go through an update cycle, where:

1. Changes to the [master process flow](/product-documentation/virtual-environments/implementing-virtual-environments/creating-a-master-process-flow.md) are made in a `draft` version.
2. The updated `draft` flow version is [tested against the required virtual environments](/product-documentation/virtual-environments/implementing-virtual-environments/testing-a-process-flow-against-a-virtual-environment.md).
3. The updated `draft` flow version is [deployed](#different-deployment-approaches-for-process-flow-updates).

{% hint style="info" %}
If you're not familiar with how flow version deployments work in virtual environments, please refer to [Understanding flow versioning for virtual environments](/product-documentation/virtual-environments/implementing-virtual-environments/deploying-a-single-process-flow-to-a-virtual-environment/understanding-flow-versioning-for-virtual-environments.md).
{% endhint %}

## Different deployment approaches for process flow updates

The approach you take to deploy an updated process flow to virtual environments depends on how many process flows / virtual environments are being updated:

* [One or two](#updating-one-or-two-process-flows-in-one-or-two-virtual-environments)
* [More than a couple](#updating-multiple-process-flows-in-multiple-virtual-environments)

### **Updating one or two process flows in one or two virtual environments**

With just one or two process flows in a couple of virtual environments, it's reasonably efficient to [deploy the updated process flow version(s) individually](/product-documentation/virtual-environments/implementing-virtual-environments/deploying-a-single-process-flow-to-a-virtual-environment.md). &#x20;

<figure><img src="/files/3pACL2LN8mnVyaqZZLlv" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For instructions, please refer to [Deploying a single process flow to a virtual environment](/product-documentation/virtual-environments/implementing-virtual-environments/deploying-a-single-process-flow-to-a-virtual-environment.md).
{% endhint %}

### **Updating multiple process flows in multiple virtual environments**

If you need to update more than a couple of flows in different virtual environments, it's more efficient to [deploy your process flow updates via a package](/product-documentation/virtual-environments/virtual-environment-packages/managing-packages/deploying-a-package.md). A [package](/product-documentation/virtual-environments/virtual-environment-packages.md) is a collection of process flow versions, which can be deployed to a virtual environment in a single operation.&#x20;

When a [package](/product-documentation/virtual-environments/virtual-environment-packages.md) is deployed to a virtual environment, any existing versions of packaged process flows are overwritten - there's no need to delete them first.

<figure><img src="/files/TSYOk55ifRIXapagosTW" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For instructions, please refer to [Deploying a package](/product-documentation/virtual-environments/virtual-environment-packages/managing-packages/deploying-a-package.md).
{% 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://doc.wearepatchworks.com/product-documentation/virtual-environments/managing-virtual-environments-versions-and-flows/managing-virtual-environment-flow-deployments/updating-the-process-flow-version-deployed-in-a-virtual-environment.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.
