Wednesday, April 24, 2024

VBCS - Understand actions and action chains

  1. 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.
  2. An action chain, like a variable, has a scope: 
    1. it can be defined at the application level : You can call an application-scoped action chain from any page.
    2.  the page level.  You can call a page-scoped action chain only from the page on which it is defined.
  3. 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.
  4. A single event may simultaneously trigger multiple action chains. For example, the page enter event may trigger multiple data fetch action chains simultaneously.
  5. 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.
  6. 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).
  7. 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.
  8. 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

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...