A Decision unit uses a set of branches each with a Boolean condition that determines which associated Connector unit to process. 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.
To add the Decision unit, follow these steps.
In the Pipeline dashboard, click Add Unit.
Select Decision unit to add it to the pipeline.
Drag a line from a unit to the new Decision unit, then click the Decision unit to open the Mapping Editor.
You need to create two or more branches, one of which must resolve to true.
Click Create new branch then provide a name and condition:
Branch name - for example
Branch condition - for example
request.path.type = "xapix"
Click the Plus (+) sign to add a second branch and provide a name and condition as with the first branch.
Continue with other required branches.
Click Done to close the Mapping editor.
On the Pipeline dashboard, connect one of the branches to a Connector unit. Connect other branches to their respective Connector units.
Click the Decision unit to view the completed mapping in the Mapping editor.
Click Done to save your changes.
Sometimes you may need to put a Merge unit after using a Decision units. In these instances, without a Merge unit, data from only one of the Decision units will be appear in the pipeline transformation. This may be the desired behavior you want, If not, add a Merge unit afterwards to have results from both branches to be present.