Branching
Branching allows your flows to make decisions based on conditions, directing execution along different paths depending on the given input. The If node is commonly used for this purpose, allowing you to define logic where execution follows one path if a condition is met and another if it is not.

Generating a Value: In the example above, the
Randomnode produces a number between0and10, which is sent to theIfnode.Evaluating a Condition: The
Ifnode checks if the value is greater than5using thepredicateinput.Branching Execution: If true, execution follows the
thenpath; if false, it follows theelsepath.Logging the Result: One of the
Lognodes prints either “Value is large” or “Value is small” based on the condition.
There are several other branching nodes, wich support various use-cases:
Std Switch - is used to select one of two values based in two potentially incoming paths
Std OrElse - is used to select a fallback value when you have a value which can potentially be null.
Std Match - is used to create an arbitrary number of branches based on a list of potential values.
Std Fork/Std FanOutRange/Std FanOutList - these nodes can be used to fork a flow into multiple independenc processes, which execute concurrently and can be joined together again using Std Join and Std JoinAll.
Last updated
Was this helpful?