# Process flow versioning

## Introduction

With our process flow versioning system, you can be sure that a process flow that's currently deployed will never be edited while it's in use:

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

To edit a deployed process flow, you take a copy as a [draft](#draft) and work on that. When you're ready, you can then [deploy your draft](/product-documentation/process-flows/managing-process-flows/flow-deployment/deploying-a-process-flow-with-virtual-environments.md). Each time you deploy a process flow, the previously deployed version is saved as an [inactive](#inactive) version. You can [view all versions associated with a process flow in process flow settings](/product-documentation/process-flows/building-process-flows/process-flow-versioning/accessing-process-flow-versions.md).

{% hint style="info" %}
For any process flow, there's always one [draft version](#draft), one [deployed version](#deployed), and any number of [inactive versions](#inactive).
{% endhint %}

{% hint style="warning" %}
If [virtual environments](/product-documentation/virtual-environments/about-virtual-environments.md) are in use for your organisation, process flow versioning works differently. 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 %}

## Version types summary

At any given time, a process flow can be associated with one of the following version types:

<table data-full-width="false"><thead><tr><th width="153.6171875">Version</th><th width="344.38671875">Is set when...</th><th>Can edit?<select><option value="3pI5LpsxEQxa" label="yes" color="blue"></option><option value="gS2TmLOUkvxc" label="no" color="blue"></option></select></th><th>Can delete?<select><option value="nW3mF1SdBZBt" label="no" color="blue"></option><option value="HKa4OZjvHzML" label="yes" color="blue"></option></select></th></tr></thead><tbody><tr><td><a href="#draft">Draft</a></td><td><ul><li>A new process flow is added</li><li>A <code>deployed</code> version is copied to draft</li><li>An <code>inactive</code> version is copied to draft</li></ul></td><td><span data-option="3pI5LpsxEQxa">yes</span></td><td><span data-option="nW3mF1SdBZBt">no</span></td></tr><tr><td><a href="#deployed">Deployed</a> </td><td><ul><li>A <code>draft</code> version is deployed</li><li>An <code>inactive</code> version is deployed</li></ul></td><td><span data-option="gS2TmLOUkvxc">no</span></td><td><span data-option="nW3mF1SdBZBt">no</span></td></tr><tr><td><a href="#inactive">Inactive</a> <br></td><td><ul><li>A <code>draft</code> process flow is deployed, replacing an existing deployment </li><li>An <code>inactive</code> process flow is deployed, replacing an existing deployment </li></ul></td><td><span data-option="gS2TmLOUkvxc">no</span></td><td><span data-option="HKa4OZjvHzML">yes</span></td></tr></tbody></table>

## More about version types

* [Draft](#draft)
* [Deployed](#deployed)
* [Inactive](#inactive)

### Draft&#x20;

There is always one `draft` version of a process flow. The `draft` version can be edited freely without any possibility of changing or breaking the version that's currently [deployed](#deployed). With a `draft` version, you can add/update [shapes](/product-documentation/process-flows/building-process-flows/process-flow-shapes.md) and [process flow settings](/product-documentation/process-flows/building-process-flows/process-flow-settings.md). &#x20;

{% hint style="info" %}
Any [trigger shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape.md) settings defined for a `draft` version are ignored.  A `draft` version is never triggered to run automatically.
{% endhint %}

#### Available actions

You can take the following actions with a `draft` version of a process flow:

<table><thead><tr><th width="248.6953125">Action</th><th>Summary</th></tr></thead><tbody><tr><td><a href="/pages/pYScpgY8PusDda3ju8dF">Duplicate</a></td><td>Create a new process flow from the selected <code>draft</code> version. There is no impact on the <code>draft</code> version.</td></tr></tbody></table>

### Deployed&#x20;

The `deployed` version of a process flow is the one that's currently in use (if `enabled`) or ready for use (if it's `disabled`).

The `deployed` version of a process flow cannot be edited - [shapes](/product-documentation/process-flows/building-process-flows/process-flow-shapes.md) can't be added/updated, and you can't change [process flow settings](/product-documentation/process-flows/building-process-flows/process-flow-settings.md).&#x20;

#### Available actions

You can take the following actions with a `deployed` version of a process flow:

<table><thead><tr><th width="248.6953125">Action</th><th>Summary</th></tr></thead><tbody><tr><td><a href="/pages/pYScpgY8PusDda3ju8dF">Duplicate</a></td><td>Create a new process flow from the selected <code>deployed</code> version. There is no impact on the <code>deployed</code> version.</td></tr><tr><td><a href="/pages/Df51rvd7siIVkBwXWI6x">Copy to draft</a></td><td>The process flow remains <code>deployed</code> and the content is copied to the existing <a href="#draft">draft</a> version (existing <code>draft</code> content is discarded). This is a good solution if you're editing a <code>draft</code> but reach the point where you need to restart from a known, sound point.</td></tr><tr><td><a href="/pages/IoFkQkIE30MmZ3Ocvc4c">Upload to marketplace</a></td><td>Upload the selected version to your <a href="/pages/Yh6SKOPDHxyeAAMVa7BT">private marketplace</a> (only applicable if the <a href="/pages/5JzXXY339CKzG84bKWYR#about-the-partner-features-bolt-on">partner features bolt-on</a> is enabled for your company profile).</td></tr></tbody></table>

### Inactive&#x20;

Each time a `draft` version of a process flow is [deployed](#deploying-a-draft-version), the previously deployed version becomes an `inactive` version, so you have a full version history for all deployed versions of a process flow.

An `inactive` version of a process cannot be edited - [shapes](/product-documentation/process-flows/building-process-flows/process-flow-shapes.md) can't be added/updated, and you can't change [process flow settings](/product-documentation/process-flows/building-process-flows/process-flow-settings.md).&#x20;

#### Available actions

You can take the following actions with an `inactive` version of a process flow:

<table><thead><tr><th width="248.6953125">Action</th><th>Summary</th></tr></thead><tbody><tr><td><a href="/pages/pYScpgY8PusDda3ju8dF">Duplicate</a></td><td>Create a new process flow from the selected <code>deployed</code> version. There is no impact on the <code>deployed</code> version.</td></tr><tr><td><a href="/pages/Df51rvd7siIVkBwXWI6x">Copy to draft</a></td><td>The process flow remains <code>inactive</code> and the content is copied to the existing <a href="#draft">draft</a> version (existing <code>draft</code> content is discarded). This is a good solution if you need to revert to an old way of working.</td></tr><tr><td><a href="/pages/HyXIsNg3KxuUiXJIad5H">Delete</a></td><td>Whilst it's often useful to refer back to an <code>inactive</code> version of a flow for a reminder of how things used to be set up, retaining lots of process flows with multiple <code>inactive</code> versions can be detrimental to system performance. In this case, deleting older <code>inactive</code> versions is a useful housekeeping task.</td></tr></tbody></table>


---

# 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/process-flows/building-process-flows/process-flow-versioning.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.
