Flow Control Actions
Flow Control Actions allow users to control the flow of their Workflows
Flow Control Action Name | Icon |
---|---|
If | ![]() |
If else | ![]() |
Switch | ![]() |
Loop | ![]() |
While | ![]() |
Wait | ![]() |
Set variables | ![]() |
Note | ![]() |
Run On Error | ![]() |
End Run | ![]() |
If & If-Else Statements
If
statements in the Blink Platform play a crucial role in controlling the flow of workflows. They evaluate conditions by comparing values, and based on these comparisons, trigger specific actions. This allows workflows to respond dynamically to different scenarios. By incorporating AND and OR logic, if statements enable more complex decision-making, as they can assess multiple conditions simultaneously, providing greater flexibility in handling various situations.
This icon, which appears to left of the step , verifies weather a specific condition is either true
or false
without running the nested actions.
The If
statement: Determines the workflow’s direction based on whether a specified condition is true
.
The If-Else
statement: Determines the workflow’s direction based on whether a condition is true
or false
. If true
, the workflow follows one course of action; if false
, it follows an alternative course.
Switch Case
The Switch Case action allows you to compare a given value with a series of possible values and execute different blocks of actions based on the matching case value.
Flow Control Action Name | description |
---|---|
Switch case | The Switch Case includes a Switch Variable which is compared to a list of case values. If any of these case values matches the Switch Variable, it prompts the execution of a particular block of actions associated with that matching case value. |
Case | Each Case is a value that is compared against the Switch Variable if the value of the Switch Variable matches a Case value, the corresponding block of actions associated with that will be executed |
Actions | Within each case, you can choose any set of Actions to be performed. |
Case Default | The default case serves as a default output option and comes into play when the Switch Variable does not match any of the other Case values. |
Loop - For Each
The ‘For Each’ loop executes an action or multiple actions for each element in a list.
To reference an item in a list you can use Expression language or the variable Picker and the JSON Dot Walking Method to reference the current item in the loop.
While Loop
The ‘While’ action enables you to run an action or multiple actions for as long as specified conditions are met.
Note: By default, if the condition is not met at the start, the while loop will not execute at all.
Wait
The ‘Wait’ Action pauses the workflow for a set time before continuing to run the rest of the workflow. You can specify the wait time in seconds, minutes, or hours.
The “Wait” action will have a maximum timeout of 14
days. For more information please visit the Workflows Runtime Limitations section of our documentation.
Variable type | Default value | |
---|---|---|
Wait For | 1. Time Interval, 2. Workflow Execution, 3. Web Form Response | |
Timeout | The time value- when reached, the step is completed and the workflow will continue | |
Time Unit | Seconds, Minute, or Hours. |
Set Variables
The set variables Action enables users to define variables and use them in the execution of the Workflow.
Defining and using variables:
Add the ‘Set Variables’ action to the Workflow Editor to create a set variables Step.
Select a variable type (boolean, numeric, string, or list.)
Enter a name for the variable.
Set the value for the variable. If not set, the default values are as follows:
Variable Type | Default value |
---|---|
Boolean | false |
Numeric | 0 |
String | [] |
List | "" |
Note: Lists can be comma-separated or in JSON list format.
Click the ‘Add Variable’ button to add more variables
Use the newly created variable, in the following steps of your workflow, using the Variable Picker or Blink’s Expression Language.
Note
The ‘Note’ action provides a rich text editor that allows you to add helpful instructions, explanations, or contextual guidance for end-users within a Workflow. The text editor supports Markdown (md
) syntax. This action is useful for adding clarity to complex workflows, ensuring users understand the next steps or any important details.
Run - On Error
The Run - On Error action is used to handle errors that might occur during the execution of a workflow. It utilizes a dual-step structure, consisting of Run and On Error, designed to efficiently manage any errors that might arise while executing actions within the Run phase.
- Run: This step is designed for placing action(s) that contributes the overall Workflow sequence.
- On Error: If there is an error during Run block, the flow will automatically shift to the On Error block. In this block, specific actions are taken to address the error. The error JSON object will be made available within the On Error block to assist in handling the error.
If an error occurs in the Run block but is successfully handled in the On-Error block, the workflow will continue to run after the executing the On-Error block. However, if errors occur in both the Run’ and On-Error blocks, then the workflow will fail.
End Run
The End Run Action enables you to select the final status of an execution, Completed or Failed.
Was this page helpful?