Parallel Execute

Content Type: Module
Categories: Scheduling

Overview

Run a microflow for each object in a list with ease. Supports parallel execution. Perfect for REST calls. Similar to Promise.all in javascript and parallelStream in java. It supports four operations: forEach, filter, map and flatMap. Completely configurable and simple to use. No third party dependencies.

Documentation

This module is meant as a light weight and simpler version of the process queue module.
Unlike the ProcessQueue module this module has no data that needs to be configured, no dependencies and does not use the database at all.
On the other hand, all actions in this module run synchronously and there is no guarantee for the order of execution.

The benefits of running synchronously is that error handling, debugging and microflow design are all much simpler. The negative side is that it blocks execution. This is not a problem for background processes like scheduled events but should be considered if the microflow is invoked from the browser.

The main use case is to execute multiple requests in parallel when doing REST/Web Service calls or working with data from Data Hub. It is similar to 'Promise.all' in javascript and can give significant speed-up for IO-bound microflows.

The module consists of four actions. Every action executes a microflow for every object in a list. The difference is only in what the return type of the microflow is.
◻ ParallelForEach - returns nothing. Use this for running microflows with side effects like making DB changes
◻ ParallelFilter - Returns a list of objects from the input list if the result of executing the microflow is true
◻ ParallelMap - Returns a list of objects that are the result of executing the microflow with an object from the input list
◻ ParallelFlatMap - Same as ParallelMap but each object maps to a list rather than another object. These lists are then combined (flattened) in a single resulting list.

Releases

Version: 1.0.0
Framework Version: 7.23.0
Release Notes: initial release