Description:
The parallelFor step lets you iterate over several steps; the workflow will dynamically grow at runtime based on the keys provided within the step configuration. Steps must be placed between the parallelFor step and the parallelForEnd step, as shown below.
The parallelFor step lets you define the start marker step.
Inputs
- varKeys – list of keys comma separated ex: 1,2,3
- varName – name of the variable to hold the key ex: variable.key
Returns
- True – step executed successfully
- False - step failed to execute
The parallelForEnd step lets you define the end marker step.
Inputs
- None
Returns
- None
Usage:
Example:
Let’s build and execute the parallelFor-parallelForEndDef example.
- Create a new definition called “parallelFor-parallelForEndDef”
- Select the definition and click the “design” button
- Drag the parallelFor, parallelForEnd, and Decision steps and connect them together
- Configure the "parallelFor" step as shown in the image below.
- Click on "parallelFor" step to configure the “Settings” properties. The keys are comma-separated (like 1,2,3 in this example), and the steps are iterated 3 times. The keys can also be initialized by a variable reference (may contain 7,3,10), and the steps are iterated 3 times. The keys are always comma-separated by design. For e.g., key-value 3 iterates only once and not 3 times.
- Once executed, the workflow will automatically grow to have the number of paths based on the number of keys, as shown below.