Helper Flows
Helper Flows enable developers to create reusable logic that can be called from different activities within workflows. By modularizing frequently used logic, Helper Flows enhance code maintainability, reduce duplication, and improve efficiency.
Create Helper Flows
Follow the below steps to create a helper flow:
- From the explorer menu, right-click on Helper Flows and select Add Folder.
- Provide a suitable name for the folder. These folders can be used to segregate and categorize the related helper flows together.
- Right-click the created folder and select Add.
- In the properties panel, configure the properties as required and then click Save.
| Name | Description | Additional Comments |
|---|---|---|
| Name* | A unique identifier for the Helperflow. | Starts with a letter (A-Z or a-z) Contains only letters, numbers, and underscores (a-z, A-Z, 0-9, _) Cannot start with a number or underscore No special characters like -, $, ., or spaces Must have at least two characters |
| Group | Name of the folder is displayed here. | This property cannot be edited. |
| Async Operation* | Specify whether the flow is an async operation. Either Yes or No. | By default, it is set to No. |
| Description | A brief explanation of the HelperFlow purpose. | Helps users understand the HelperFlow functionality. |
| Is Active | Specify whether the helper flow is active for accessing. Either Yes or No. | Options: Yes (active) or No (inactive). Defaults to Yes. |
Note: An asterisk (*) denotes that the property is mandatory for creating a helper flow.
The "Helper Flow added successfully" message displays upon successful creation.
- The helper flow designer canvas shows the Start and Stop constructs by default. From the ribbon, add the required constructs and configure them as required inside the flow to create a logic. For more information on constructs, refer to Configure Constructs.
- Click Save to save a helper flow.
The "Helper Flow updated successfully" message displays upon successful update.
Structure of a Helper Flow
The created helper flow contains the following:
- Input Params
- Output Param
- Variables
- Exceptions. A base exception is created by default when a helper flow is created.
Add Input Parameters, Output Parameter and Variables
Users can add the parameters and variables to a helper flow as applicable. To add, follow the below steps:
- Right-click the Input Params (or) Output Param (or) Variables and select Add. A pop-up window displays.
- Configure the below properties as required and then click Save.
| Name | Description | Additional Comments |
|---|---|---|
| Parameter Name* | A unique identifier for the parameter. | What It Supports? Starts with a letter (A-Z or a-z) Allows letters, digits, and underscores after the first character Supports single-character variable names Empty trailing characters after the first letter are allowedShape What It Does Not Support? Does not start with a letter Contains unsupported special characters Empty strings are still invalid |
| Is Array | Specify whether the parameter is an array or not. | By default, it is set to No. |
| Data Type* | Select the data type of the parameter from the drop-down. | 1) For Map Configuration When the Map type is selected, additional fields appear: Key Type: Specifies the data type of the map's keys. Supports all primitive types. Value Type: Defines the data type of the map's values. Supports both primitive and complex types. Map types are not allowed as value types. Is Array (for Value Type): Determines if the value type should be an array. The Is Array checkbox controls the array status of the value type only. Behaviour: The Default Value field is NOT visible when the Map type is selected.2) Default Value Controls:Boolean: Dropdown with True and False options.String: Textbox for string input.Integer, Double, long: Numeric textbox.DateTime: Two options:Fixed: Displays a calendar for date selection.Current: Uses the current date and time. |
| Description | A brief explanation of the parameter purpose. | Helps users understand the parameter functionality. |
Note: An asterisk (*) denotes that the property is mandatory for creating a parameter or variable.
The success message displays upon successfully adding a parameter or variable.
Add Exceptions
Users can add the exceptions to a helper flow as applicable. To add, follow the below steps:
- Right-click Exceptions and select Add. A pop-up window displays.
- Configure the below properties as required and then click Save.
| Name | Description | Additional Comments |
|---|---|---|
| Name* | A unique identifier for the exception. | What It Supports? Starts with a letter (A-Z or a-z) Allows letters, digits, and underscores after the first character Supports single-character variable names Empty trailing characters after the first letter are allowedShape What It Does Not Support? Does not start with a letter Contains unsupported special characters Empty strings are still invalid |
| Exception* | Select the exception from the drop-down. | The exceptions created in the Workflow Exceptions folder are available in the drop-down. |
| Handler | Select the handler that is filtered based on the selected exception | The handlers created in Workflow Exceptions are available in the drop-down. |
Note: An asterisk (*) denotes that the property is mandatory for adding an exception.
Constructs
The following are the constructs available in a helper flow:
| Constructs in Helper Flows |
|---|
| If |
| Continue |
| Switch |
| Run Query Async |
| C# Snippet |
| Call Workflow |
| Raise Event |
| Json Parse |
| Call Aggregate Function |