- 27 Jul 2022
- 1 Minute to read
About Branching and Merging Flows
- Updated on 27 Jul 2022
- 1 Minute to read
Branching and merging allow users to process multiple Flow steps at the same time, rather than one after the other. If an Assignment needs three approvals at the same time, branching and merging would allow the Designer to create three separate Step paths that can run those assignments simultaneously, as opposed to one after the other. It can run three steps at the same time, assigning three different workflow activities to three different people.
When the execution of a branch and merge is done, a Merge step will wait for all of the threads of execution to complete before moving on to the next step in the process.
Branch and Merge steps do not create Parallel processing and should only be used with assigned Forms to create parallel approval processes.
- Navigate to a Designer Folder and click CREATE FLOW.
- Name the Flow and select CREATE.
- Drag and drop the Branch step and Merge step from Steps > Flow Management to the workspace.
- Any steps that are anchored between the Branch step and Merge step will run in parallel. However, this is not a true parallel. The steps will not run at the same time, but each step will be able to accept the same input and send its output to the steps within their branch.
- To take advantage of this new structure, anchor multiple Form interactions between the Branch and Merge steps.
- In the Steps panel, navigate to Forms [Interaction] > [Current Folder], and drag the previously created elements to the Flow Designer workspace: Form 1, Form 2, Form 3, and Form 4. For example purposes, these Forms only have a button on them.
- Connect a Branch step to the input of each Form, then connect the output of each Form to the Merge step.
- This will merge the output of all four Forms into one input for the End step. Connect the Start and End steps.
- Select Debug in the top action panel.
- Stepping through the Debugger, see how each Form is presented in sequence.
- Each Form's output is held at the Merge step until the other Forms have been processed, after which all Form data is combined and sent to the End step.
- Looking at the Debugger, the Forms receive input from the Branch step. The Merge step accepts the outputs of all four Forms, merges them, and sends a single output to the End step.