Switch

Build non-linear decision models

The Switch node introduces a dynamic branching mechanism to decision models, enabling the graph to diverge based on conditions.

Conditions are written in a Zen Expression Language. By incorporating the Switch node, decision models become more flexible and context-aware. This capability is particularly valuable in scenarios where diverse decision logic is required based on varying inputs. The Switch node efficiently manages branching within the graph, enhancing the overall complexity and realism of decision models in GoRules JDM, making it a pivotal component for crafting intelligent and adaptive systems.

📘

The Switch node preserves the incoming data without modification; it forwards the entire context to the output branch(es).

Hit policy

There are two hit policy options for the switch node, first and collect.

In the context of a first hit policy, the graph branches to the initial matching condition, analogous to the behavior observed in a table. Conversely, under a collect hit policy, the graph extends to all branches where conditions hold true, allowing branching to multiple paths.

📘

You can change Hit Policy in the bottom right corner of the switch node.