Skip to main content
Version: v5.0

Fork Join

Overview#

The Fork Join task is a control flow construct that enables workflows to execute multiple branches of tasks in parallel. It is useful when independent operations can run simultaneously, improving performance and reducing overall workflow execution time.

Note: Nesting of a FORK_JOIN task within another FORK_JOIN task is not supported.

Parameters#

ParameterTypeRequiredDescription
_nameStringNoName the fork join task.
_typeStringNoEnter FORK_JOIN.
_sequencenoNumberNoDefines the execution order of the task within a workflow.
_forkTasksArray of ObjectYesAn array of task group arrays to run in parallel.

Sample request#

{    "_name": "parallel_execution_task",    "_type": "FORK_JOIN",    "_sequenceno": 1,    "_inputParams": {},    "_forkTasks": [        [            {                "_name": "rest_connector_task_1",                "_type": "REST_CONNECTOR",                "_sequenceno": 1,                "_inputParams": {                    "_url": "<URL>",                    "_auth": {                        "_type": "NoAuth"                    }                }            },            {                "_name": "script_execution_1",                "_type": "SCRIPT_EXECUTION",                "_sequenceno": 2,                "_inputParams": {                    "_userType": "workflow_userType",                    "_scriptName": "iaffetch"                }            }        ],        [            {                "_name": "rest_connector_task_2",                "_type": "REST_CONNECTOR",                "_sequenceno": 1,                "_inputParams": {                    "_url": "<URL>",                    "_auth": {                        "_type": "NoAuth"                    }                }            },            {                "_name": "script_execution_2",                "_type": "SCRIPT_EXECUTION",                "_sequenceno": 2,                "_inputParams": {                    "_userType": "workflow_userType",                    "_scriptName": "iaffetch"                }            }        ]    ]}