Branch shape
This is preview documentation for a new feature that will be available in our next scheduled release.
Introduction
The branch shape allows you to add shapes to multiple, distinct paths in a process flow, which are executed sequentially. Paths are executed one at a time, in the configured sequence, using the same incoming payload.
For complex scenarios, branching means you can split the logic in your flow, so it's easier to build, understand, and manage. For example, a common scenario for syncing orders between two systems is to:
Pull orders from the source system
Check if customer record exists in the destination system
If not, create it
Check if the address exists in the destination system
If not, create it
Decrement stock record in the destination system
Send order info to the destination system
This can all be achieved using one, long process flow however, the branch shape provides the ability to organise the steps logically. So:
Branch 1 creates/updates customer records
Branch 2 creates/updates address records
Branch 3 updates stock records
Branch 4 sends the orders to a warehouse system
Need to know
The same data (i.e. any payload(s) that hit the branch shape) flows down every branch.
All steps in a branch must be completed before the next branch starts.
If one branch fails, any subsequent branches will not start.
Nested branch shapes are permitted - so you can have a branch shape within a branch.
The maximum number of branches for any branch shape is 6.
If a branch includes a try/catch shape, the catch steps are processed at the end of the flow, not at the end of the branch.
Adding a branch shape
Step 1 In your process flow, add the branch shape in the usual way:
Step 2 The shape is added to your flow with two path stubs - for example:
Step 3
Click the settings
icon for the branch shape:
Step 4 Branch names are shown for the two placeholders:
...you can change these names as appropriate - for example:
...and add more branches if needed:
At this point you can rename and delete branches, but you can't re-sequence them yet. A branch can only be re-sequenced after at least one shape has been added to its path:
Step 5 Once all branches have been added, save changes:
...the branch shape is updated and you'll see a placeholder stub for each branch you added in the previous step:
Step 6 Now you can add shapes to each branch in the normal way. As soon as you add your first shape to a branch, empty shapes are added to the others - for example:
...click on these placeholders to replace them with the required shape from the shapes palette:
Nested branch shapes are allowed - so if required you can have a branch shape within a branch:
There are no limitations on the number of nested levels however, nesting too deeply will have an impact on flow clarity.
Managing branches
Having added branches to a branch shape, you may wish to:
These tasks are completed from branch shape settings:
Renaming a branch
You can rename a branch at any time - simply overwrite the existing name and save shape settings:
Re-sequencing branches
A branch must have at least one shape added to its path before it can be re-sequenced in settings:
If you attempt to re-sequence a branch that has no associated shapes in its path, you'll be prevented with a 'no entry' indicator:
Deleting a branch
When a branch is deleted, it's removed entirely - any shapes currently defined in its path are also removed. To delete a branch, click the associated delete button:
Managing branch paths
Shapes are added to branch paths in the normal way. Each path is just a flow that you build by adding shapes from the shapes palette and configuring them as needed.
If you remove the only shape in a branch path, that branch shifts to become the last in sequence. If you go on to add more shapes to this path, make sure that you check branch shape settings and re-sequence your branches if necessary.
Last updated