The Batch Process action enables you to execute a single module multiple times. This can be particularly useful, for example, in generating personalized documents for a list of individuals with a single click.
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.
To achieve this, you would use the Batch Process action to link two modules together: a parent module, which contains the action node and passes a collection to it, and the child module (headless module), which runs multiple times, once for each item in the collection.
How to use the Batch Process action
-
Start by creating the child module. This module will execute in the background. Click on the START icon at the top of the graph, then + Add a start parameter. Define which values the module will receive from the parent module.
You can ignore the API parameter name field in this context. -
Finish your child module. Do not use input, Handover, or Redirect Result nodes, as they require human intervention, which is impossible when the module executes in the background. Publish your child module.
-
Create a new module; the parent module.
-
In the parent module, create a collection. This collection should contain items that you want to process with the child module.
-
Add a New action and choose Batch Process. Select the collection from the dropdown list.
-
Choose the child module in the Select module field. A new section MAP START PARAMETERS will appear. Map the fields from the collection to the start parameters to pass them from the parent module to the child module.
-
Publish and run the parent module.
Technical considerations
- The parent module does not wait for all of the sessions of the child module to be executed. The child module runs in the background.
- The individual child modules are executed simulatenously and in no particular order.
- The child module cannot return any values to the parent module.
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.