Multi environment management - best practice
Introduction
When building and testing your process flows before going live, a common requirement is to build process flows that connect to development/staging instances of your third-party systems - this ensures that you're not working with live data during the testing phase.
This page details our suggested procedure for managing this approach in terms of:
Adding process flows with different environments
Our suggested practice for adding process flows when you want to work with different environments is detailed in the following sections:
Phase 1: add connectors
Step 1 Install or build required connectors for third-party systems to be integrated in your process flows.
Step 2 Add any required instances of these connectors and specify your DEV/STAGE credentials (i.e. credentials that allow you to access data in your DEV/STAGE environment for the third-party system). It's a good idea to indicate DEV/STAGE as part of the instance name. For example:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FTI9FKikB9X0n8hMb2TXU%252Finstance%2520name%2520example.png%3Falt%3Dmedia%26token%3Db33c768a-570a-4eb4-b60d-ae4216a14464&width=768&dpr=4&quality=100&sign=624544eb&sv=1)
Step 3 Add any required instances of these connectors again, this time using your PRODUCTION credentials (i.e. credentials that allow you to access data in your PRODUCTION environment for the third-party system). It's a good idea to indicate PRODUCTION as part of the instance name. For example:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252F6THV7m9h6ELx52sbVRK5%252Finstance%2520name%2520example%25202.png%3Falt%3Dmedia%26token%3Dd057d9c9-ba9b-4f0e-a042-4a298f39ab86&width=768&dpr=4&quality=100&sign=a1a79ae4&sv=1)
Phase 2: build & test process flows
Step 1 Create a new process flow with the required name and description. You may wish to indicate DEV/STAGE as part of the process flow name but this isn't essential if you follow subsequent steps to apply labels.
Step 2 From the process flow canvas, access process flow settings.
Step 3 Move down to the labels section and apply a label that indicates that this process flow is configured for your DEV/STAGE environment - for example:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FHMoHPjQGRFSDcFPLpUGT%252Fchoose%2520label.png%3Falt%3Dmedia%26token%3D9729169b-91bd-41d7-91bf-303545a1984a&width=768&dpr=4&quality=100&sign=e57317e0&sv=1)
If required labels don't exist, you can create them 'on the fly' from here, or go to settings > labels for label management. More information is available in our Process flow labels section.
Step 4 Build the process flow. When configuring connection shapes, ensure that you select the DEV/STAGING instance:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FHV8lbS1RWREz1W4RRQtJ%252Fconnection%2520config%25201.png%3Falt%3Dmedia%26token%3D345fd6c3-e9a8-440c-8b9f-9fa78a36f9b7&width=768&dpr=4&quality=100&sign=cc61629f&sv=1)
Step 5 Build the rest of your process flow as required. If you are required to select instances for other shapes in your flow, always ensure that you select the DEV/STAGING instance.
Step 6 Test carefully to ensure that the right data (i.e. DEV/STAGING data) is processed as expected.
Phase 3: duplicate flows for production
Step 1 When you're satisfied that your process flow is working correctly, duplicate the version that you want to use in your live environment.
Phase 4: configure flows for production
Step 1 Edit the duplicated process flow and access process flow settings.
Step 2 Update the process flow name as required. You may wish to indicate PRODUCTION as part of the process flow name but this isn't essential if you follow subsequent steps to apply labels.
Step 3 Move down to the labels section. Remove the existing DEV/STAGE label and replace it with a label that clearly indicates that this process flow is configured for your PRODUCTION environment - for example:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FvU6SaTjHal1GM1taidpY%252Fchoose%2520label%25202.png%3Falt%3Dmedia%26token%3D168f7d0f-1d36-43b5-8ff0-2dcf920c014b&width=768&dpr=4&quality=100&sign=d5d08a8f&sv=1)
If required labels don't exist, you can create them 'on the fly' from here, or go to settings > labels for label management. More information is available in our Process flow labels section.
Step 4 Save changes.
Step 5 For every connection shape in the process flow, access settings and change the DEV/STAGING instance to the equivalent PRODUCTION instance:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FdgVswJ9HC2fOibBPllem%252Fconnection%2520config%25202.png%3Falt%3Dmedia%26token%3D90f8a595-6e3a-44f6-991f-4258bfcd8f9d&width=768&dpr=4&quality=100&sign=a06d9b38&sv=1)
Step 6 Check all other shapes in your process flow - if instance details are present, ensure that the PRODUCTION instance is selected.
Step 7 Check other shapes in your process flow. Typically, any instance information defined for a connection shape is inherited by subsequent 'child' shapes (which require instance details) in the flow. However, it's always worth double-checking before going live.
Step 8 When you're ready, deploy and enable the process flow.
Phase 5: housekeeping
At this point, you now have different 'environment flavours' of the same process flow - for example:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252F6jBp8jHZo8hBjy0lfvzm%252Fmanage%2520flows.png%3Falt%3Dmedia%26token%3Da93c993b-4f00-4925-8ded-9033c0dfed9d&width=768&dpr=4&quality=100&sign=428f99c9&sv=1)
Keep in mind that your Core subscription tier determines the number of active (i.e. deployed and enabled) process flows that are allowed for each company profile.
Once your PRODUCTION version is in place and running, we advise that you disable the DEV/STAGE version but leave it in place to test any future updates.
Updating process flows with different environments
If you need to update a PRODUCTION process flow, there are two options, summarised below.
Option 1
Edit the draft version of the existing PRODUCTION process flow and deploy changes once you're satisfied that the flow is running correctly.
This approach requires caution! Connections in the flow are configured for your live data, so you need to be sure that you've adjusted relevant filters during the testing phase.
With care, this option is fine for smaller changes. For more complex changes, Option 2 is the safest approach.
Option 2
Edit and test the existing DEV/STAGING version of the process flow. Once testing is complete, follow steps in Phase 3, Phase 4 and Phase 5 above to duplicate the process flow and configure PRODUCTION connections. Having done this, you can either:
Remove the 'old' PRODUCTION process flow
Last updated