# Process flow settings

## Introduction

Process flow **settings** are used to manage settings and behaviour for the process flow as a whole:&#x20;

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fq5lNZr6mlEH6dek6V1ij%2Fprocess%20flow%20settings%201a.png?alt=media&#x26;token=720449da-4015-4f57-b14f-312a43a2bc2f" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
The ability to update some settings depends on the [version status](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-versioning). For example, you can't add flow variables to a deployed version.
{% endhint %}

{% hint style="warning" %}
If the [virtual environments](https://doc.wearepatchworks.com/product-documentation/virtual-environments/about-virtual-environments) feature is enabled for your company profile, process flow settings will vary. Please refer to our [virtual environments](https://doc.wearepatchworks.com/product-documentation/virtual-environments) section for more information.
{% endhint %}

## Understanding process flow settings

Process flow settings are summarised below.

<table><thead><tr><th width="104.33333333333331">#</th><th width="186">Item</th><th>Summary</th></tr></thead><tbody><tr><td>1</td><td>Process flow name &#x26; description</td><td>The name displayed for this process flow throughout the system. Optionally, you can include a description.</td></tr><tr><td>2</td><td>Queue priority</td><td><p>All process flow run jobs are added to <a href="../../error-reporting-and-exception-handling/run-logs-and-queue#working-with-your-run-queue">your queue</a> and, by default, are picked for processing when a slot becomes available - i.e. they have a <code>regular</code> priority. </p><p></p><p>If required, you can use this dropdown field to select the priority in which runs for this process flow are picked from your queue. Choose from:</p><ul><li><code>Highest</code>. This job is picked from the queue before anything else. If more than one job is queued with this priority, the one queued first is picked.</li><li><code>High</code>. This job is picked from the queue AFTER any <code>highest</code> priority jobs are cleared.</li><li><code>Regular</code>. This job is picked from the queue at the first opportunity AFTER any <code>high</code> and <code>highest</code> priority runs are cleared. This is the default setting.</li><li><code>Low</code>. This job is picked from the queue AFTER any <code>regular</code> priority jobs are cleared.</li><li><code>Lowest</code>. This job is picked from the queue AFTER any <code>low</code> priority jobs are cleared.</li></ul><p><mark style="background-color:yellow;">Note!</mark> If your process includes a <a href="process-flow-shapes/standard-shapes/run-process-flow-shape">run process flow shape</a>, note that any 'sub flows' do NOT inherit the queue priority from the 'calling' flow. You should set the priority for these as required.</p></td></tr><tr><td>3</td><td>Enabled toggle button</td><td>Use this option to <a href="../managing-process-flows/enabling-and-disabling-a-process-flow/enabling-and-disabling-a-process-flow-without-virtual-enviroments">enable or disable this process flow</a>. <br><br>Note that if the <a href="../../virtual-environments/about-virtual-environments">virtual environments</a> feature is enabled for your company profile, this option is not available (since flow versions are enabled rather than the flow as a whole). For more information, please refer to <a href="../../virtual-environments/managing-virtual-environments-versions-and-flows/managing-virtual-environment-flow-deployments/disabling-or-enabling-a-process-flow-deployment-for-a-virtual-environment">Disabling and enabling a flow version</a>. </td></tr><tr><td>4</td><td>Use queued time</td><td><p>Some process flow steps (connectors, filters, set variables, transforms, etc.) can be configured to use dynamic/relative dates, where the date is relative to the time that the variable is used in the process flow.</p><p></p><p>With the introduction of <a href="../../error-reporting-and-exception-handling/run-logs-and-queue#working-with-your-run-queue">queues</a> for process flow runs, all scheduled process flows are added to a queue when they are initialised. This means that the time a flow is <em>initialised</em> is not the same as the time the flow actually <em>runs</em> - sometimes the run will be almost instant, but in busier periods there may be some minutes between starting and running a flow.</p><p></p><p>To prevent cases where filtered records are omitted because they were added between the time a flow was initialised and the time it left the queue to run, the <em>use queued time</em> process flow setting can be used. This allows you to choose whether any relative dates should be based on:</p><ul><li>the time that the variable is reached in the flow (i.e the current time)</li><li>the time that the process flow was queued</li></ul><p>This option defaults to <code>true</code> for all new process flows.   <br></p><p><strong>Example</strong></p><p>To find all records created in the last 2 hours, a relative date variable is configured as:</p><pre><code>- 2 hours UTC
</code></pre><p>At 12:00 the process flow enters the queue. At this point, the value of this variable would be: <code>10:00</code></p><p></p><p>At 14:00 the process flow leaves the queue and runs. At this point, the value of this variable would be: <code>12:00</code> </p><p></p><p>So:</p><ul><li>With the <em>use queued at time</em> option set to <code>ON</code>, we take the time the flow entered the queue as our base for the relative date variable, so we'd retrieve all records created after <code>10:00</code>.</li><li>With the <em>use queued at time</em> option set to <code>OFF</code>, we take the current time as our base for the relative date variable, so we'd retrieve all records created after <code>12:00</code>.</li></ul></td></tr><tr><td>5</td><td>Remove failed payloads</td><td><p>Toggle this option <code>on</code> if you want to remove payloads that would otherwise cause this flow to fail. This is useful if multiple payloads pass through a process flow (for example, if received data is paginated or batched via a <a href="process-flow-shapes/standard-shapes/flow-control-shape">flow control </a>shape) and one or more of these includes a data issue. </p><p></p><p>With this option switched on, the failed payload is removed and the flow continues. If the process flow completes successfully, its <a href="../../error-reporting-and-exception-handling/run-logs-and-queue#run-status">status</a> is set to <code>partial success</code>.</p><p></p><p>Failed payloads can be viewed in <a href="../error-reporting-and-exception-handling/real-time-run-logs">real-time run logs</a>, via the <a href="../../error-reporting-and-exception-handling/real-time-run-logs#failed-payloads">failed payloads tab</a>. These payloads can be downloaded from <a href="../error-reporting-and-exception-handling/run-logs-and-queue/working-with-run-logs/viewing-detailed-logs-for-a-flow-run">run logs</a>:<br><br><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fy1OuELeWOm4nHgAzmVP4%2F2failed%20payload%20in%20logs.png?alt=media&#x26;token=0c7eaa37-d923-4a03-bb94-4bdb81e66121" alt=""></p></td></tr><tr><td>6</td><td>Production flow</td><td>If this option is toggled ON, Patchworks will receive alerts if a run fails for this flow, which may be analysed to understand trends and areas for future enhancements.</td></tr><tr><td>7</td><td>Labels</td><td>View and update <a href="../managing-process-flows/process-flow-labels">labels</a> associated with this process flow. You can remove an existing label, apply labels from the dropdown list, or create a new label.</td></tr><tr><td>8</td><td>Email failure notifications</td><td>Use the dropdown list to select a notification group to receive an <a href="../error-reporting-and-exception-handling/email-notifications-for-failed-process-flow-runs">email alert if a process flow run fails</a>.</td></tr><tr><td>9</td><td>Deploy</td><td>Use this option to <a href="../process-flow-versioning#deploying-a-draft-or-inactive-version">deploy the currently selected draft or inactive version</a>.</td></tr><tr><td>10</td><td>Variables</td><td>Define <a href="dynamic-variables/flow-variables">flow variables</a> and then reference these values throughout the entire process flow.</td></tr><tr><td>11</td><td>Versions</td><td>All existing versions of a process flow are displayed. From here, you can select any version to view the flow at that point in time. You can also choose to <a href="../managing-process-flows/flow-deployment/deploying-a-process-flow-with-virtual-environments">deploy the currently selected draft or inactive version</a>, and to <a href="../managing-process-flows/duplicating-a-process-flow">duplicate any version of a process flow</a>.</td></tr></tbody></table>
