Branch shape

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:

[1] Pull orders from the source system [2] Check if the customer record exists in the destination system [3] If not, create it [4] Check if the address exists in the destination system [5] If not, create it [6] Decrement stock record in the destination system [7] 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

A single incoming payload for any process flow shape should not exceed 500MB.

We recommend processing multiple, smaller payloads rather than one single payload (1000 x 0.5MB payloads are more efficient than 1 x 500MB payload!).

For payloads up to 500MB, consider adding a flow control shape to batch data into multiple, smaller payloads. Payloads exceeding 500MB should be batched at source.

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.

  • If a branch includes a run process flow shape, the required sub-flow is triggered immediately and subsequent branch steps continue. The branch shape does NOT wait for the sub-flow to complete.

  • 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.

  • The maximum number of branches for any branch shape is 6.

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:

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

Before re-sequencing branches, ensure that any new branches have been saved (save the shape and re-access shape settings). Then it's just a matter of using up/down arrows to move branches to the right place:

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.

Last updated