The Batch Process action enables you to execute a single module multiple times. This is particularly useful for generating personalized documents, sending automated emails, or processing multiple items from a collection.
The Batch Process action offers both asynchronous and synchronous processing options.
Run Module on Collection action is now called Batch Process action
Please note that the Run Module on Collection (RMoC) action has been renamed to Batch Process action. The functionality and features discussed in this documentation remain the same.
How the Batch Process action works
The Batch Process action links two modules together:
-
Parent Module
Contains the action node and passes a collection of items to the child module. -
Child Module (Headless Module)
Runs multiple times, once for each item in the collection. It runs in the background and does not return values to the parent module.
How to use the Batch Process action
1. Create the Child Module
The child module runs in the background and should be designed without human interaction.
- Click the START icon at the top of the graph.
- Select + Add a start parameter to define which values the module will receive from the parent module.
- You can ignore the API parameter name field.
Do not use Input, Handover, or Redirect Result nodes, as they require human interaction and prevent the module from running properly in the background.
- Disable Show confirmation page in the Result node settings.
- Publish your child module.
2. Create the Parent Module
- Create a collection containing the items you want to process with the child module.
- Add a New action and select Batch Process.
- Select the relevant collection from the dropdown.
- Choose the child module in the Select module field.
- In the MAP START PARAMETERS section, map fields from the collection to the start parameters of the child module.
3. (Optional) Enable Synchronous Batch Processing
You can choose to wait for all child module executions to finish before the parent module continues.
- In the Batch Process configuration dialog, toggle Wait for all module executions to finish.
- Toggle Off: The batch is triggered, and the parent module continues immediately.
- Toggle On: The parent module only continues once all child module sessions have reached a final state (completed or error).
Errors in child modules are treated as completed executions. The parent continues.
Depending on the amount of children and tasks within the module, waiting for their completion can take significant time and slow down the flow for your end user. Only use it if the flow in your parent module has a dependency on the output of the child modules.
For important requirements when using this option, see the Technical considerations section.
4. Publish and Run the Parent Module
If the collection is empty, the Batch Process action is skipped.
To monitor executions:
- Go to Log & Statistics of the parent module.
- Open the BACKGROUND TASKS tab to see all triggered child module sessions and their details.
Technical considerations
- The child module runs in the background.
- Child modules are executed simultaneously and in no particular order.
- Child modules cannot return values to the parent module.
- If using Wait for all module executions to finish, ensure:
- The child module does not contain any user input.
- The Show confirmation page option in the Result node is disabled.
Otherwise, the child modules will not complete, and the parent module will not continue.
Occasionally asked questions
Collections cannot hold an infinite number of items. Hence, it may be helpful to split your set of items into smaller groups. For example, one way to do this is to set filters when reading a collection of items from a database.