- An action chain is made up of one or more individual actions, each of which represents a single asynchronous unit of work. Action chains are triggered by events.
- An action chain, like a variable, has a scope:
- it can be defined at the application level : You can call an application-scoped action chain from any page.
- the page level. You can call a page-scoped action chain only from the page on which it is defined.
- To create an action chain, you can define your own actions and can also use predefined actions. Actions within a particular chain run serially, and multiple action chains can run concurrently. Action chains simplify the coordination of asynchronous activities.
- A single event may simultaneously trigger multiple action chains. For example, the page enter event may trigger multiple data fetch action chains simultaneously.
- An action is a specific function that performs a task. In JavaScript terms, an action is a Promise factory. An action can exist only within an action chain, not independently.
- An example of an action chain is one that makes a REST call (first action), then takes the result of that and stores that in a variable (second action).
- Action chains have a well-defined context and contract: an action chain orchestrates its underlying actions, coordinating state flow and the execution path. The action chain can define input parameters and local variables that are only available in that context.
- Visual builder comes with a set of builtin or predefined actions for an action chain used for example, navigation or assigning variable values, we can use if and switch actions that take an expression and offer multiple different chain continuations depending on the result
Action chains are defined at the application or page level and triggered by a specific event, such as
onValueChange
(for a variable), or vbEnter
. An event may include a payload, which can then be used within the action chain. A payload may be passed into an action chain through the input parameters. The Visual Builder user interface can help you create action chains automatically (with appropriate input parameters) based on a particular event.
No comments:
Post a Comment