See the supported connectors for Application Integration.
For Each Parallel task
The For Each Parallel task lets you run other integrations (sub-integrations) from your main integration. As the task name suggests, the sub-integrations run in parallel.
This task uses the API Trigger ID as a handle to identify the integrations to run.
For example, if you specify the API Trigger ID
api_trigger/APITriggerX, the task runs all the sub-integrations that have
api_trigger/APITriggerX trigger ID.
After running a sub-integration, you can also read the response of the sub-integration in your main integration. Use this task to run sub-integrations as dependencies of the main integration.
Configure the For Each Parallel task
To configure the For Each Parallel task:
- In the Google Cloud console, go to the Application Integration page.
- In the navigation menu, click Integrations.
The Integrations List page appears.
- Select an existing integration or create a new integration by clicking Create integration.
If you are creating a new integration:
- Enter a name and description in the Create Integration dialog.
- Select a Region for the integration from the list of supported regions.
- Click Create.
This opens the integration in the integration designer.
- In the integration designer navigation bar, click +Add a task/trigger > Tasks to view the list of available tasks.
- Click and place the For Each Parallel task element in the integration designer.
- Click the For Each Parallel task element on the designer to open the For Each Parallel task configuration pane.
- Configure the displayed fields using the Configuration properties for the task
as detailed in the tables below.
All changes to the properties are saved automatically.
This section describes the configuration properties of the For Each Parallel task.
|Property Name||Parameter Name||Data type||Description|
||An array of type string, integer, double, or JSON.||List of values for which the sub-integrations must run.
A separate sub-integration thread runs for each value in the list, and all
the threads run in parallel.
You can pass the iterated value to the sub-integration by setting the Where to map individual array elements field.
You can also pass additional values from the main integration to the sub-integration in the Map to additional sub-integration input(s) field.
||String||Trigger ID of the sub-integration to run.
This value is available in the Trigger ID field of the API Trigger in the sub-integration.
SYNC: Runs the sub-integrations in synchronous mode. In this mode, the main integration waits for the sub-integrations to complete before continuing with the downstream tasks.
ASYNC: Runs the sub-integrations in asynchronous mode. In this mode, the main integration does not wait for the sub-integrations to complete. Immediately after calling the sub-integrations, the main integration runs the downstream tasks.
||N/A||Runs all integrations
that have the same API Trigger ID.
For example, if integration
Note: If you select this option, the response from the sub-integrations is not be available in the main integration. If you want to use the response of the sub-integrations, select the Run a single integration option.
||N/A|| Runs only the integration specified in the
Integration name field. You can use the response from the sub-integrations
by configuring the Collect values from sub-integration output(s) section.
|On each execution||
||String||The name of the sub-integration input variable where the array elements should be mapped. The array elements can be mapped directly to a sub-integration input variable. If a single sub-integration is selected, you can select the sub-integration input variable from a dropdown list.|
||String||Additional sub-integration mapping option.
This field takes values in the form of key-value pairs, where the key is a variable in the main integration, and the value is the corresponding input variable in the sub-integration.
For example, consider your main integration has the
||String||If the execution strategy is synchronous (SYNC) and a single sub-integration (Run a single integration) is selected, the outputs of the sub-integration can be collected into array variables in the current integration.
||Integer||Maximum number of parallel executions allowed for sub-integrations. The default value is
All sub-integrations in a cohort run completely before the next cohort of sub-integrations run.
You can specify any one of the following values:
Retry on failure
You can configure various retry strategies to handle errors in a task. The retry strategies allow you to specify how to rerun the task or integration in case of an error. For more information, see Error handling strategies.
We recommend the following best practices when using the For Each Parallel task:
- Set your cohort size based on any quota limitations imposed by your sub-integrations.
- Use a SYNC execution strategy when you want to collect the output of the sub-integration for later use.
- Use an ASYNC execution strategy when your sub-integration might run longer than 2 minutes.
For information about the usage limits that apply to the For Each Parallel task, see Usage limits.
In general, do not use a SYNC execution strategy if your sub-integration takes longer than 2 minutes to run or you plan to use this task in conjunction with naturally asynchronous tasks like the Approval task.