# Virtual environment  packages

## Introduction

A *package* is a collection of process flow versions that can be deployed to a given virtual environment in a single operation. If you have lots of process flows to manage, this is more efficient than [deploying them individually](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/deploying-a-single-process-flow-to-a-virtual-environment).

Having [created](https://doc.wearepatchworks.com/product-documentation/virtual-environments/virtual-environment-packages/creating-a-package) a package, you add the required process flow versions and then (when you're ready) [deploy](https://doc.wearepatchworks.com/product-documentation/virtual-environments/virtual-environment-packages/managing-packages/deploying-a-package) the package to each virtual environment. Once a package is deployed, it remains available so you can deploy the same set of flow versions in future.&#x20;

## Need to know

* A package can contain *one* version of any given process flow. If you need to deploy different versions of the same process flow, you must create one package for each version.
* You can deploy a given package to a virtual environment as many times as you need.
* If a [deployed configuration](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/deploying-the-configuration-for-a-virtual-environment) exists for the selected virtual environment, this will be used. Otherwise, the current `draft` configuration is used.  Note that this behaviour differs from [deploying a single process flow via process flow settings](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/deploying-a-single-process-flow-to-a-virtual-environment), where only `deployed` virtual environments can be selected.&#x20;
* If you deploy a package to a virtual environment and the package includes a process flow that already exists in that virtual environment, the package takes precedence - the existing version becomes `inactive` and the package version is `deployed`.  Note that this behaviour differs from [deploying a single process flow via process flow settings](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/deploying-a-single-process-flow-to-a-virtual-environment).
* When process flows are deployed via a package, they are [enabled](https://doc.wearepatchworks.com/product-documentation/virtual-environments/managing-virtual-environments-versions-and-flows/managing-virtual-environment-flow-deployments/disabling-or-enabling-a-process-flow-deployment-for-a-virtual-environment) automatically (i.e. they will run in that environment according to any trigger shape settings).&#x20;
* Process flows are associated with a package for deployment purposes only. After a flow version is deployed, it won't be affected by any subsequent actions taken with the package - for example, if a package is [removed](https://doc.wearepatchworks.com/product-documentation/virtual-environments/virtual-environment-packages/managing-packages/deleting-a-package), any associated flow deployments won't change.
