TABLE OF CONTENTS
The Action Sequences page () allows you to create and manage a series of steps executed in a defined order, where each step must complete before the next step begins. Whether a step succeeds or fails, the sequence always progresses.
Compared to standalone actions triggered by events like button clicks, action sequences offer greater control over execution flow. They let you define multi-step processes, manage dependencies, and handle errors.
What is an Action Sequence?
An action sequence consists of multiple steps that execute in a specified order. Each step performs a specific function, such as setting a variable, calling an external API, or running another action sequence.
The following screenshot illustrates an example of an action sequence that searches for a user, evaluates the response, updates status variables based on the result, and opens a dialog.
Creating Action Sequences
You can configure and manage action sequences by clicking the lightning-bolt icon () in the left panel of the App Studio.
To create an action sequence:
- In the Action Sequences dialog, click the plus icon to add a new action sequence.
- Enter a Name for the sequence.
- Add Input Variables. For details, check the Input variables section.
- Add Actions to define the sequence steps. For details, check the Actions section.
- Configure Output. For details, check the Output isection.
Once configured, the action sequence can be used in event handlers, keyboard shortcuts, or other action sequences. The following sections provide more details on Input Variables, Actions, and Output to help you configure them effectively.
Input Variables
Action sequences can include input variables, which allow dynamic values to be passed into the sequence. These variables can be used within the sequence’s steps using mustache expressions.
For example, if your sequence includes an input variable called userId, you can reference it in a mustache field as {{userId}}. For details, check the Understanding mustaches and expressions article.
When linking an action sequence to an event handler or keyboard shortcut, you will be prompted to provide values for the input variables:
Actions
Each step in an action sequence can be one of the following types:
Action
An Action is a step within an action sequence that performs a specific task, such as setting a variable, evaluating a data set, or calling another action sequence. Actions define the core operations within a sequence.
To add an action:
- Click the Add step arrow.
- Select Action.
- Specify the Name for the action.
- Select the action from the Action dropdown. This can be any of the existing action types, such as 'Set a variable' or 'Evaluate a data set'. It can also be the 'Call an action sequence' action, which allows you to trigger another pre-configured action sequence. Depending on the selected action, additional configuration may be required.
Group
A Group is a collection of actions that start simultaneously and do not proceed to the next step until all actions are complete. For example, you might create a group containing multiple actions to evaluate external API data sets. The system sends requests to all APIs at once, waits for their responses (whether successful or failed) and then moves on to the next step in the sequence.
To add a group:
- Click the Add step arrow.
- Select Group.
- Specify the Name for the action.
- Select the action from the Action dropdown. Depending on the selected action, additional configuration may be required.
- Hover over the newly added action and click the Add action (+) icon that appears below it.
- Repeat steps 1–3 to add additional actions as needed.
- If you need more actions, continue clicking the Add action (+) icon and repeating steps 1–3 until all necessary actions are added.
If
This allows you to define different execution paths based on a condition.
To add an If step:
- Click the Add step arrow.
- Select If.
- By default, an If branch and an Else branch are provided. Click on the branch and specify the condition for it.
- You can add additional branches by hovering over the final Else and clicking the plus icon. Adding a condition to an Else branch converts it into an Else If branch.
The first branch with a condition that evaluates to true is executed. If a condition is left empty, it is treated as true by default.
The example below demonstrates how to handle API errors using an If/Else condition. The sequence first retrieves user data. If no error occurs, it sets a success variable; otherwise, it sets an error variable and displays an error dialog.
Fork
A Fork splits execution into multiple branches that run in parallel.
To add a Fork:
- Click the Add step arrow.
- Select Fork.
- Click the fork icon (
)and and select the action you want to add.
The sequence waits until all branches finish before proceeding to the next step after the fork’s Join block.
In the example action sequence below, we fetch user details from multiple APIs before submitting a form.
Managing Steps in a Sequence
Steps in an action sequence can be reordered using drag-and-drop functionality or deleted:
- Move steps within a sequence.
- Drag actions in and out of groups or branches.
- Drag an entire Group, If, or Fork structure.
- To delete a step, hover over it and click the trash icon that appears.
- If the last step is removed from a Group or branch of a Fork, that Group or branch is automatically deleted.
Output
An action sequence can include an output configuration, similar to a data mapper data set. This allows you to define the structure of the output and specify where the data should come from. Input variables from the sequence, along with other App data, can be referenced in the output mappings.
The output from an action sequence can be used elsewhere in the App just like data from data sets. It also appears in the App’s data console. However, if an action sequence does not produce any output, it will not be shown in the console.
Evaluation and Execution Behavior
Action sequences follow specific execution rules:
- Action sequences can be triggered by event handlers and keyboard shortcuts.
- Actions inside a sequence can call other action sequences.
- If a sequence is triggered while it is already in progress (for example, you have a slow-running sequence triggered by a button, and you click the button multiple times in quick succession), additional requests are queued. Each request starts only after the previous one is complete. This prevents a sequence from overlapping with itself, though different sequences can run in parallel.
- It is possible to refer to an action’s evaluation status in Mustache expressions, similar to data sets, by using the :evaluating suffix. Even if an action sequence does not produce output data, you can still check whether it is currently evaluating.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article