Special considerations for building master process flows - trigger settings

Introduction

Currently, the trigger shape cannot be replaced as part of virtual environment configuration. As such, you should consider how the trigger settings in your master process flow will operate when run in virtual environments.

The ability to replace trigger settings as part of virtual environment configuration will be added soon - please keep an eye on release notes for upcoming updates.

Schedules

If your process flow needs to run on an automated schedule, does the same schedule apply to all virtual environments?

  • Yes No further action/consideration required - define the required trigger schedule(s) in the master process flow.

  • No Currently, it's not possible to create different trigger schedules for different virtual environments. As such, you should create different process flows (or different versions of the same process flow) for each required schedule, and deploy the appropriate flow/version to each virtual environment.

Webhooks

When you add a webhook to the trigger shape in a master process flow, the webhook address is generic for the flow - it doesn't know about virtual environments. As such, you need to adjust the webhook URL before applying it in your own systems.

1

Find the ID for each required virtual environment

Access each virtual environment in turn, and note the virtual environment URL prefix - you'll find this in the top-right corner of the virtual environment page:

2

Generate a webhook in the master process flow

Access trigger shape settings in your master process flow and generate a webhook.

3

Edit the generated webhook for each environment

This step requires the id of each virtual environment that you will be using. As such, it's something you should do after creating your virtual environments.

In your preferred text editor, create x versions of the generated webhook (where x is the number of virtual environments you are using).

The generated webhook will be in the form:

https://webhooks.wearepatchworks.com/api/v1/company/webhook?signature

For example:

https://webhooks.wearepatchworks.com/api/v1/docsdemo/01jy1rx577a1q8fn19kn03py88?patchworks_signature=8ra8ay1pxx1j999999171y91137qnkka0jr98nfp0f83n70n197y

This must be changed to include an environment id, immediately before the signature:

https://webhooks.wearepatchworks.com/api/v1/company/webhook/environment_id?signature

For example:

https://webhooks.wearepatchworks.com/api/v1/docsdemo/01jy1rx577a1q8fn19kn03py88/23?patchworks_signature=8ra8ay1pxx1j999999171y91137qnkka0jr98nfp0f83n70n197y

...in this example, 23 is the virtual environment id.

4

Apply edited webhooks

Use your updated webhooks wherever needed in your third-party systems.

Callbacks

When you add a callback to the trigger shape in a master process flow, the callback address is generic for the flow - it doesn't know about virtual environments. As such, you need to adjust the callback URL before applying it in your own systems.

1

Find the ID for each required virtual environment

Access each virtual environment in turn, and note the virtual environment URL prefix - you'll find this in the top-right corner of the virtual environment page:

2

Generate a callback in the master process flow

Access trigger shape settings in your master process flow and generate a callback.

3

Edit the generated callback for each environment

This step requires the id of each virtual environment that you will be using. As such, it's something you should do after creating your virtual environments.

In your preferred text editor, create x versions of the generated callback (where x is the number of virtual environments you are using).

The generated callback will be in the form:

https://callbacks.wearepatchworks.com/api/v1/company/callback?signature

For example:

https://callbacks.wearepatchworks.com/api/v1/docsdemo/01jy1vdxp12ptqa8wh7tkb8jyy?patchworks_signature=ytxh81p999kdy210pt21008bzpby7tjdjw87vjzk1aajvqhx1pwq

This must be changed to include an environment id, immediately before the signature:

https://callbacks.wearepatchworks.com/api/v1/company/callback/environment_id?signature

For example:

https://callbacks.wearepatchworks.com/api/v1/docsdemo/01jy1vdxp12ptqa8wh7tkb8jyy/23?patchworks_signature=ytxh81p1t8kdy210pt21008bzpby7tjdjw87vjzk1aajvqhx1pwq

...in this example, 23 is the virtual environment id.

4

Apply edited callbacks

Use your updated callbacks wherever needed in your third-party systems.

Last updated