Add a Run In Parallel Action

The Run In Parallel action is used to run multiple code blocks in parallel, and you can also use this action to wait for their results in order to produce a combined result.

For API information about this action, see Run in Parallel in the Oracle Visual Builder Page Model Reference.

Use 1: Run Multiple Action Chains in Parallel

To use a Run In Parallel action to just run multiple action chains in parallel:

  1. Add the action in one of three ways, as explained at the end of Built-In Actions.
  2. Drop the actions to run for each block in the Add Actions area of the Run in Parallel action. For example, you could make two REST calls and assignments in parallel:

  3. To add another block of code to run in parallel, you have two options:

Use 2: Run Multiple Action Chains in Parallel to Produce a Combined Result

To use a Run In Parallel action to produce a combined outcome from the results of multiple action chains:

  1. Add the Run In Parallel action in one of three ways, as explained at the end of Built-In Actions.
  2. For the Store Result In property, provide a name for the array that will hold the result from each block. The first block's result is stored at index 0, the second block's result is stored at index 1, and so on.

  3. Drop the actions to run for each block in the Add Action area of the Run in Parallel action.
  4. To add another block of code to run in parallel, you have two options:
    • Right-click a block and select Duplicate from the context menu.
    • Drag the first action for the block from the Action's palette onto a Create Block area that appears at the bottom of a block when you drag an action over it.
  5. Drop a Return action at the end of each block to return its result in the array that was named using the action's Store Result In property:

    An array is returned by the Run in Parallel action (empInfo for this example, set in step 2): the first element contains the first block's result, the second contains the second block's result, and the third contains the third block's result.