Decision units

Learn how to use decision units to control data flow

Decision units allow you to create branches to control the data flow based on formulas.

When you add a Decision unit to a pipeline, you define a branch by using a condition that resolves to either true or false. Branch conditions can use formulas. When a condition resolves to true, then the associated branch is executed and the pipeline data flow follows the associated sub-pipeline.

Only one branch can resolve to true. All others must resolve to false, otherwise the pipeline will give an error.

The following screenshot shows a pipeline with a Decision unit with two branches.

Pipeline with a Decision unit and two branches with data sources

To add the Decision unit as shown in the pipeline above, follow these steps.

Steps
Steps
  1. In a pipeline, drag a line from a unit and drop it on a connection indicator.

  2. From the Select unit to place pane, click Decision unit to add it to the pipeline.

  3. In the pipeline, click the Decision unit.

  4. In the Edit Decision pane, click Create new branch to add the first branch.

  5. In the new branch, enter the following:

    1. Branch name - for example alpha users

    2. Branch condition - for example request.path.user_type = "alpha" Note: Conditions are similar to formulas except it must resolve to "true" to be executed.

    3. Add a second branch.

  6. In the Edit Decision pane, click the Plus (+) sign to add a second branch.

  7. In the second branch, enter the following:

    1. Branch name - for example beta users

    2. Branch condition - for example, request.path.user_type = "beta". Note: Both branches cannot resolve to "true".

  8. Connect the branch alpha users to a data source using the connection point and from the Select unit to place pane.

  9. Connect the beta users to a data source using the connection point and the Select unit to place pane.

  10. Click Done to save your changes.

Example
Example
Decision unit - create new branch
First branch name and condition
Second branch name and condition
Decision branches added
Decision unit added

‚Äč