> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Appendix - Workflow

> Workflow Types Every workflow is designated a Type , with each Type serving a different purpose. To understand Workflow Types appropriately it is impo

## Workflow Types

Every workflow is designated a **Type**, with each Type serving a different purpose. To understand Workflow Types appropriately it is important to understand the Build and Deploy process within FlexDeploy. A diagram representing a typical implementation can be seen below.

![BuildDeployFlexDeploy](https://mintcdn.com/flexagon-llc-ce77a95c/YN4KiePcysQpaVpd/images/fd111/12590911009.png?fit=max\&auto=format\&n=YN4KiePcysQpaVpd\&q=85\&s=44e110ad2abad88b1a62f4fd3bf1c0ef)

<table><colgroup><col /><col /></colgroup><tbody><tr><th>**Workflow Type**</th><th>**Description**</th></tr><tr><td>Build</td><td>The first step in the Build/Deploy model. The Build Workflow most commonly does the following tasks:<ol start="1"><li>Clones the source code defined on the Project</li><li>Does some form of compilation on the source code</li><li>Publishes or **produces** the results to FlexDeploy’s Artifact Repository.</li></ol></td></tr><tr><td>Deploy</td><td>The Deploy Workflow is most commonly the next workflow run. Its duties consist of reading or **consuming **Artifacts published during the Build Workflow and uploading or deploying those Artifacts to your Deploy Target.An example of this could be taking html/css/javascript bundled during build and uploading to Azure to be served.</td></tr><tr><td>PreDeploy</td><td>Prior to running the aforementioned Deploy Workflow, you can optionally run a PreDeploy Workflow. The PreDeploy Workflow can use the Build Artifacts and running any checks prior to the Deploy Workflow executing. Some examples of this could be:<ul><li>Running the deploy in preview mode</li><li>Performing some sanitation logic on the Deploy Target to ensure its ready for Deployment</li><li>Creating a manual task that must be reviewed prior to the Deploy executing</li></ul>Note: Any inputs required or optional defined in the deploy workflow, must be configured in the pre-deploy workflow. These deploy inputs must be either defined in the inputs or in variables. This will facilitate the inputs given in the deploy request form to be set when the deploy workflow is executed from pre-deploy.</td></tr><tr><td>Test Definition</td><td>The last Workflow run is a Workflow testing the previous deployment on the Deploy Target. A common example being running some form REST tests, using something like Postman, to validate the Deployment.</td></tr><tr><td>Utility</td><td>Utility Workflows fall outside of the typical Build and Deploy process outlined above. Utility Workflows don’t consume or produce any artifacts and are most commonly used to run adhoc on demand logic on a Target Server.A few examples would be:<ul><li>Restarting a server</li><li>Running a script on a server</li><li>Performing server cleanup on a fixed schedule</li></ul>Note that Utility Workflows can only be used by a specific Project Classification called `Utility` or can be referenced from other Workflows.</td></tr><tr><td>Other</td><td>Lastly, the black sheep of the family, Other Workflows cannot be used by any Project directly. Their only usage is to have common Workflow logic that can be called from the Workflow types listed before.</td></tr></tbody></table>

## Workflow Operations

### Assign

The Assign step provides the ability to assign a value to a workflow variable or a property. Property values that are overridden will keep the new value for the rest of the workflow execution.

![image-20240318-170449.png](https://mintcdn.com/flexagon-llc-ce77a95c/s0aZcWvz1eo3cr__/images/fd111/12590910946.png?fit=max\&auto=format\&n=s0aZcWvz1eo3cr__\&q=85\&s=10634bcc73f27d8cae157ac989eeb375)

<table><colgroup><col /><col /></colgroup><tbody><tr><th>**Field**</th><th>**Description**</th></tr><tr><td>Variable</td><td>The variable or property that we are assigning to.</td></tr><tr><td>Expression</td><td>The expression (groovy) value that should be assigned.</td></tr></tbody></table>

### Error Handler

The Error Handler step essentially provides a try/catch mechanism for your Workflow Definition. The Step itself provides two “scopes” in which nested Workflow Steps can be used. The first being the **Default** scope and the second being the **On Error** scope.

![image-20240318-171745.png](https://mintcdn.com/flexagon-llc-ce77a95c/s0aZcWvz1eo3cr__/images/fd111/12590910955.png?fit=max\&auto=format\&n=s0aZcWvz1eo3cr__\&q=85\&s=930853b14659595bd4b049e55e47788b)

Should an error occur while processing Steps defined in the Default Scope ![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/31-20e3.png) , the Workflow Engine will immediately move to the On Error Scope ![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/32-20e3.png) and start running Steps. The Error Handler Step provides a few configuration options outlined below:

![image-20240318-173425.png](https://mintcdn.com/flexagon-llc-ce77a95c/s0aZcWvz1eo3cr__/images/fd111/12590910949.png?fit=max\&auto=format\&n=s0aZcWvz1eo3cr__\&q=85\&s=12b9067d3ec12f3bc949ce436afbf6d3)

<table><colgroup><col /><col /></colgroup><tbody><tr><th>**Field**</th><th>**Description**</th></tr><tr><td>Propagate Error</td><td>Determines what action should occur after executing the Steps defined in the On Error Scope<ul><li>True - The original error that triggered the move to the On Error Scope will be “re-thrown” and any steps defined after your Error Handler will not be executed.</li><li>False - The original error will suppressed and any steps defined after your Error Handler will being executing as if no error occurred.</li></ul></td></tr><tr><td>Error Variable</td><td>Once an error occurs it can be useful to get access to the error object in your On Error Scope. Specifying a variable in this input will assign that error object into that variable so it can be accessed.**Error Variable Scope**Note that both Error Variable and Error Message Variable are scoped to the Error Handler On Error block. Both variables will not be accessible outside of this Scope.</td></tr><tr><td>Error Message Variable</td><td>Identical to Error Variable except it only contains the text of the error instead of the full object.</td></tr></tbody></table>

### If

The If Step is a flow-control operation that allows your Workflow to dictate which Steps should be run depending on conditions.

![image-20240318-204431.png](https://mintcdn.com/flexagon-llc-ce77a95c/OY5M9woYJxDiy9Od/images/fd111/12590910952.png?fit=max\&auto=format\&n=OY5M9woYJxDiy9Od\&q=85\&s=625e3353e34d780364ab1e36bd0715a1)

At minimum, the If Step requires an If Condition ![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/31-20e3.png). One more Else If Conditions can optionally be added ![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/32-20e3.png) and finally an optional Else block can be added ![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/33-20e3.png). Every condition gets the full suite of available variables and properties at its disposal. Each condition/block can also run any number of Steps. A full example implementation of the If Step is below:

![image-20240318-205117.png](https://mintcdn.com/flexagon-llc-ce77a95c/OY5M9woYJxDiy9Od/images/fd111/12590910958.png?fit=max\&auto=format\&n=OY5M9woYJxDiy9Od\&q=85\&s=1a5f4d65ef38f41de6bbe46e184b2735)

##### Display Conditions

In the example above there is some redundancy in the conditions that makes it slightly harder to understand than it should be. We can simplify this by clicking the edit icon :Pencil\_Edit: next to the conditions.

![image-20240318-205400.png](https://mintcdn.com/flexagon-llc-ce77a95c/OY5M9woYJxDiy9Od/images/fd111/12590910961.png?fit=max\&auto=format\&n=OY5M9woYJxDiy9Od\&q=85\&s=54a80ab34591c6e222a603f6f48d1e3f)

Here we can edit the condition as well as provide a Display Name to make it a little more user friendly.

![image-20240318-205527.png](https://mintcdn.com/flexagon-llc-ce77a95c/OY5M9woYJxDiy9Od/images/fd111/12590910964.png?fit=max\&auto=format\&n=OY5M9woYJxDiy9Od\&q=85\&s=6052c1e826a8600a55711d6b4cc375cc)

### Invoke Plugin

Invoke Plugin provides the ability to invoke Plugin Operations for any installed Plugin in FlexDeploy. Unlike the rest of the Workflow Operations, Invoke Plugin cannot be dragged directly onto the Canvas. Instead, a list of available Plugins and Plugin Operations are shown below the Workflow Operations.

![image-20240320-162419.png](https://mintcdn.com/flexagon-llc-ce77a95c/OY5M9woYJxDiy9Od/images/fd111/12590910991.png?fit=max\&auto=format\&n=OY5M9woYJxDiy9Od\&q=85\&s=c9580e2e8b8588d395c64d5622342458)

In this separate section in the Palette, you can search for any Plugin or Plugin Operation and drag it onto the canvas which will present the applicable configuration for that Plugin Operation.

![image-20240320-163040.png](https://mintcdn.com/flexagon-llc-ce77a95c/OY5M9woYJxDiy9Od/images/fd111/12590910994.png?fit=max\&auto=format\&n=OY5M9woYJxDiy9Od\&q=85\&s=1010add03f2e96d16765549674bfceeb)

The configuration for Invoke Plugin can be quite daunting, but we will break it down into manageable pieces.

#### Plugin Operation

![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/31-20e3.png) The chosen Plugin and Plugin Operation shown here, are populated by default based on the Plugin Operation that was dragged into the canvas and rarely need to be changed.

#### Plugin Inputs

![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/32-20e3.png) Plugin Inputs are 1 of 3 ways a Plugin Operation can receive configuration values from the user. The other 2 are Project Properties and Target Properties. The Plugin Inputs presented depend entirely upon the chosen Plugin and Plugin Operation. More detailed information about specific Plugin Inputs can be found in the respective [Plugin Guides](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-plugin-guides.md).

#### Plugin Outputs

![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/33-20e3.png) Plugin Operations can optionally return Plugin Outputs. A Plugin Output is any meaningful piece of data that was calculated during Plugin Execution, for example the JDBC Plugin’s [compileInvalid](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-plugin-guides/flexdeploy-jdbc-plugin-guide/compileinvalid-jdbc.md) operation returns 4 Outputs:

![image-20240320-164944.png](https://mintcdn.com/flexagon-llc-ce77a95c/OY5M9woYJxDiy9Od/images/fd111/12590910997.png?fit=max\&auto=format\&n=OY5M9woYJxDiy9Od\&q=85\&s=5d325120c047c9b1d7afe616759cf66b)

Any Plugin Output can be assigned to a Workflow Variable. Doing so allows the Output to be used elsewhere in the Workflow.

#### Endpoint Specification

![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/34-20e3.png) Generally the Endpoint Specification does not need to be touched or modified. However, it can still be good to understand what it is and why it is present.

Whenever a Workflow executes, it executes on a specific Target which is decided when selecting an [Environment](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-users-guide/topology/environments.md) and [Target Group](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-users-guide/topology/target-groups.md) in the Workflow Request form. The cross-section of an Environment and Target Group is called a Target. The decided [Target](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-users-guide/topology/target-groups/target-endpoints-and-properties.md) will have 1 or more Endpoints associated with it. These [Endpoints](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-users-guide/topology/endpoints.md) are the physical machines/servers where this Plugin Execution will ultimately take place.

Having said all of that - we are ready to take a look at the available configuration:

<table><colgroup><col /><col /></colgroup><tbody><tr><th>**Field**</th><th>**Description**</th></tr><tr><td>Target Group Override</td><td>As mentioned above the Target Group and Target are decided when the Workflow Request form is submitted, should you wish to use a different Target Group, that can be specified here. **This will result in a different set of Endpoints being used for Plugin Execution.**</td></tr><tr><td>Endpoint Selection</td><td>A Target can have multiple Endpoints associated to it. This input allows you to specify which of those Endpoints are considered “candidates” for Plugin Execution.Available options are:<ul><li>**All** (default) - All Endpoints associated to the Target will considered for Execution (this does not necessarily mean they will be used).</li><li>**Resource** - An Endpoint may have a [Resource Type](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-users-guide/administration/resource-types.md) associated to it (think of it like a tag). Selecting this option allows you to select Endpoints with only a specific Resource Type.</li></ul></td></tr><tr><td>Endpoint Execution</td><td>Once the list of Endpoint candidates is chosen based on Selection criteria above, we can then decide which of those Endpoints should actually perform Plugin Executions. Available options are:<ul><li>**Any** (default) - A random Endpoint from the available candidates will be chosen and used for the Plugin Execution</li><li>**All **- Every Endpoint in the candidate list will perform a Plugin Execution. Selecting this option presents two more additional options:<ul><li>**Max Parallel %** - What percentage of the Endpoints should execute in parallel. 100% means all should execute at the same time. 1% means they should execute sequentially (provided there are not more than 100 Endpoints in the candidate list).</li><li>**Stop On Error** - Should any individual Plugin Execution fail, halt any subsequent Plugin Executions.</li></ul></li></ul></td></tr></tbody></table>

#### Artifacts Delivery

![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/35-20e3.png) A Plugin Operation can Produce or Consume Artifacts from FlexDeploy’s Artifact Repository.

Most Plugin Operations will default these values, for example, most “Build” operations will have Produces checked, and vice versa with “Deploy” operations and Consumes. There are, however, a few Plugin Operations that are more build/deploy agnostic, such as the Shell Plugin - Execute in our example. Those Plugin Operations can either Consume, Produce, or do neither. It largely depends on the purpose of the Shell script and in these cases the options must be selected manually.

#### User Inputs

Some Plugin Operations allow for passing custom User Inputs into the Plugin Execution.

![image-20240320-172459.png](https://mintcdn.com/flexagon-llc-ce77a95c/OY5M9woYJxDiy9Od/images/fd111/12590911000.png?fit=max\&auto=format\&n=OY5M9woYJxDiy9Od\&q=85\&s=1e4f046634f4188afdaa026980c1ed51)

Note that specifying a User Input on its own does not accomplish anything, it must be used as part of the Plugin Execution, in our case this means using it in our Shell script.

![image-20240320-173052.png](https://mintcdn.com/flexagon-llc-ce77a95c/s5KJA2KdwTZ5hdNK/images/fd111/12590911006.png?fit=max\&auto=format\&n=s5KJA2KdwTZ5hdNK\&q=85\&s=7cea759a5d908c1bf924a8f4e1bc1290)

#### User Outputs

Similar to User Inputs, a Plugin Operation can also allow custom User Outputs. They serve the same function as Plugin Outputs but are just user specific. Lets update our Shell API call example above to return the API response as an example. To start we need to add a new User Output.

![image-20240320-173429.png](https://mintcdn.com/flexagon-llc-ce77a95c/s5KJA2KdwTZ5hdNK/images/fd111/12590911003.png?fit=max\&auto=format\&n=s5KJA2KdwTZ5hdNK\&q=85\&s=08c35aae7084efdf732e542001fa137c)

In the above example, `API_RESPONSE` is the output that should be returned from our Shell script, and `WF_API_RESPONSE` is the Workflow Variable that will capture this value and be usable elsewhere throughout the Workflow.

![image-20240320-173740.png](https://mintcdn.com/flexagon-llc-ce77a95c/s5KJA2KdwTZ5hdNK/images/fd111/12590911012.png?fit=max\&auto=format\&n=s5KJA2KdwTZ5hdNK\&q=85\&s=a97418b82c5d90bf79b6a7d866a46374)

### Invoke Test

The Invoke Test step provides the ability to invoke a group of tests for the Project executing the Workflow. The Step will take into account any filters present in the Test Automation YAML configuration when determining what tests should be run. Several other configuration inputs can be specified to further refine the tests that should be executed.

![image-20240318-210218.png](https://mintcdn.com/flexagon-llc-ce77a95c/s5KJA2KdwTZ5hdNK/images/fd111/12590910967.png?fit=max\&auto=format\&n=s5KJA2KdwTZ5hdNK\&q=85\&s=88ef068ab61ad506fc347856e1cc44e8)

<table><colgroup><col /><col /></colgroup><tbody><tr><th>**Field**</th><th>**Description**</th></tr><tr><td>Test Name</td><td>Test Name allows further refinement of the tests considered for execution. Test Name and Test Tag will union the results should both be specified.Allows multiple entries separated by comma. *This input is a Groovy Script so be sure to enclose any literal text in quotes.*</td></tr><tr><td>Tags</td><td>Run specific tests with specific tags in the Test Automation yaml configuration. Test Name and Test Tag will union the results should both be specified.Allows multiple entries separated by comma. *This input is a Groovy Script so be sure to enclose any literal text in quotes.*</td></tr><tr><td>Test Qualifier</td><td>We can configure the Step itself to fail should the test results not meet expectation. The Test Qualifier input determines what those expectations should be.Depending upon the value chosen, Test Qualifier Value may be presented to be filled in. Set to **No Qualifier **to pass the Step regardless of the results.</td></tr><tr><td>Output Variable</td><td>You can optionally assign the result of the Step to an output variable that can be used later in the Workflow.</td></tr></tbody></table>

### Invoke Workflow

The Invoke Workflow Step allows the execution of other Workflows from the current Workflow. This allows common Workflow logic to be isolated and reused where needed.

![image-20240319-201306.png](https://mintcdn.com/flexagon-llc-ce77a95c/s5KJA2KdwTZ5hdNK/images/fd111/12590910970.png?fit=max\&auto=format\&n=s5KJA2KdwTZ5hdNK\&q=85\&s=df14144874a238d82b488f46eb0df2a7)

<table><colgroup><col /><col /></colgroup><tbody><tr><th>**Field**</th><th>**Description**</th></tr><tr><td>Workflow</td><td>This is the Workflow that should be called. While the field allows calling ANY other active Workflow, it doesn’t necessarily mean that you should. Generally its good practice to have your common Workflow logic created with the Workflow type [Other](#Workflow-Types).</td></tr><tr><td>Version Override</td><td>By Default, the active version of the invoked Workflow will be used when running this Step. You can however choose a specific version with this input.</td></tr><tr><td>Inputs (if any)</td><td>If the invoked Workflow has any defined Workflow Inputs, those will show up in this section.</td></tr></tbody></table>

### Raise Fault

Raise Fault is a Step that will throw a custom error during Workflow execution. This can be useful if you are doing some upfront validation or if you recognize the Target or Endpoint state is not as it should be.

![image-20240319-202637.png](https://mintcdn.com/flexagon-llc-ce77a95c/s5KJA2KdwTZ5hdNK/images/fd111/12590910973.png?fit=max\&auto=format\&n=s5KJA2KdwTZ5hdNK\&q=85\&s=75532eb609d3c44e28e28851fe5e84f9)

<table><colgroup><col /><col /></colgroup><tbody><tr><th>**Field**</th><th>**Description**</th></tr><tr><td>Fault Name</td><td>Fault Name should be a shorthand identifier for the particular fault that was thrown. For example CUSTOMERPREFIX\_VALIDATION\_FAULT</td></tr><tr><td>Fault Details</td><td>Fault Details is a longer form description or message of the failure.</td></tr></tbody></table>

### Run Groovy

The Run Groovy Step provides a blank Groovy script with access to all of the Workflow properties, variables, inputs, and FlexDeploy utility functions. Think of the Run Groovy script as a catch-all that can implement any solution if there is not a specific operation for it.

![image-20240319-204154.png](https://mintcdn.com/flexagon-llc-ce77a95c/s5KJA2KdwTZ5hdNK/images/fd111/12590910976.png?fit=max\&auto=format\&n=s5KJA2KdwTZ5hdNK\&q=85\&s=138abb229b345ce9f812779f0d95623d)

The script is defined by marker ![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/31-20e3.png). As you are writing your script you may find the need to create additional Workflow Variables that you would like to use outside of this step, in that case, you can quickly add more with the Add new Workflow Variable shortcut ![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/32-20e3.png) .

In addition to the variables and utilities mentioned above, it also has access to the **LOG** helper which is a nice way to write custom log messages which will be shown on the Workflow execution.

![image-20240319-204421.png](https://mintcdn.com/flexagon-llc-ce77a95c/s5KJA2KdwTZ5hdNK/images/fd111/12590910979.png?fit=max\&auto=format\&n=s5KJA2KdwTZ5hdNK\&q=85\&s=83ea17a5ae625061ed12f0e1dc7d9036)

### Wait

The Wait Step, you guessed it, waits for a set amount of milliseconds to pass before completing and allowing subsequent steps to continue.

![image-20240319-205122.png](https://mintcdn.com/flexagon-llc-ce77a95c/YN4KiePcysQpaVpd/images/fd111/12590910982.png?fit=max\&auto=format\&n=YN4KiePcysQpaVpd\&q=85\&s=c13b83ed38b3d5cd800fc1c31d2bf09f)

Like most Step configuration inputs, the Wait length does allow for using a Groovy Script for more dynamic wait times.

### While

The While Step allows repetition of the Steps defined in its “scope” while some condition evaluates to true. The most common example is running the same set of steps n number of times before exiting.

![image-20240319-205536.png](https://mintcdn.com/flexagon-llc-ce77a95c/s5KJA2KdwTZ5hdNK/images/fd111/12590910988.png?fit=max\&auto=format\&n=s5KJA2KdwTZ5hdNK\&q=85\&s=6e09ab04b77d40ff3ac3c5dfd7e1fd6c)

In the above example, we have a Workflow Variable called `counter` with a default value of 1. The loop condition then says we are going to continue executing while the counter is less than 5.

![image-20240319-205805.png](https://mintcdn.com/flexagon-llc-ce77a95c/s5KJA2KdwTZ5hdNK/images/fd111/12590910985.png?fit=max\&auto=format\&n=s5KJA2KdwTZ5hdNK\&q=85\&s=fc575f5fa9700eaa20a53d4adafd4952)

In the example above we have the `counter &lt; 5` condition ![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/31-20e3.png) are waiting for 2 seconds and incrementing our `counter` variable by 1 ![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/32-20e3.png).

> [!NOTE]
>
> **Infinite Loops**
>
> Be sure that your While loop condition will eventually evaluate to `false`. Had we not added the assign step which increments our loop counter ![(blue star)](https://flexagon.atlassian.net/wiki/s/-1062255421/6452/bc4efa6ae0580211dd7ed50a32495abcedae78b6/_/images/icons/emoticons/72/32-20e3.png) , we would keep executing the wait step over and over as the counter variable would always be equal to the default value of `1`

### Retry

The retry steps allows retrying of the Steps defined in its “scope” in case an error occurs in one of the steps. The most common example is retrying the step which might be making an external REST Call.

![image-20251031-041111.png](https://mintcdn.com/flexagon-llc-ce77a95c/YN4KiePcysQpaVpd/images/fd111/12590911009.png?fit=max\&auto=format\&n=YN4KiePcysQpaVpd\&q=85\&s=44e110ad2abad88b1a62f4fd3bf1c0ef)

<table><colgroup><col /><col /></colgroup><tbody><tr><th>**Field**</th><th>**Description**</th></tr><tr><td>Retry Count</td><td>This is the number retries to attempt (excluding the initial execution attempt) the workflow will make before failing the execution.</td></tr><tr><td>Should Retry</td><td>An optional custom script that will determine if the error should be retried. For example, if the error message contains `FD_RETRY_ERROR_MSG.contains("Unable to reach Url")`, we can retry the steps.</td></tr><tr><td>Retry Delay</td><td>The number of milliseconds to wait before retrying the step. If left blank, will execute immediately.</td></tr><tr><td>Exponential Retry Backoff</td><td>This will double the delay between consecutive retries. Only applicable if Retry Delay is specified.</td></tr><tr><td>Retry All Steps</td><td>This will Retry all the steps in the “Scope” when a failure occurs. By default, it will only retry failed steps.</td></tr></tbody></table>
