principianteInicio fácil

Switch, End

This flow demonstrates the use of the Switch and End nodes. The example is illustrative (i.e., it has no business value). By changing the input data, you can easily discover the role of the Switch and its two different winning case strategies.

DecisionRules

David Škarka

Template author

The primary goal of this rule flow is to demonstrate the practical application of the Switch node and the End node. It specifically highlights the two different evaluation strategies available for managing conditional logic and how the End node provides a visual and data-driven conclusion to a process.

This flow is for illustrative purposes and serves as a technical template rather than a business-specific logic set.

Solution Components

The flow consists of several specialized nodes that categorize and process input data to produce specific outputs.

The core logic is divided into two parallel demonstrations of the Switch node:
  • Switch with the strategy: All Winning Cases (switchAllWinningCases):
    • Behavior: This node evaluates every defined case against the input data. It executes and identifies all cases where conditions are met. If no conditions are met, it triggers the "Default" case.
  • Switch with the strategy: First Winning Case (switchFirstWinningCase):
    • Behavior: This node stops evaluation as soon as it finds the first case that meets the specified conditions. Like the previous strategy, it falls back to a "Default" case if no matches are found.
Data Manipulation nodes bridge the gap between internal node logic and the final output schema:
  • assignAllWinningCases: Maps the results from the "All Winning" switch into the output.allWinningCases variable.
  • assignFirstWinningCase: Maps the result from the "First Winning" switch into the output.firstWinningCase variable.
Termination, The End Nodes. The flow utilizes multiple End nodes (e.g., endAllWinningCases, endFirstWinningCase, endFlow). These serve two purposes:
  1. Visual Indicators: Clearly marking the end of a specific logic branch or the entire flow.
  2. Data Insight: Providing a snapshot of the final data state for that specific branch during debugging or execution.
Key Learnings from this Template
By interacting with this flow, users can learn to:
  1. Select Evaluation Strategies: Understand when to use "All Winning" (for multi-match scenarios) versus "First Winning" (for prioritized, mutually exclusive scenarios).
  2. Utilize Default Paths: Implement fallback logic when no conditions are satisfied.
  3. Visual Flow Management: Use the End node to organize complex flows and inspect data states at the conclusion of branches.
Check iconA checkmark inside a circle signifying "yes"Minus iconA minus inside a circle signifying "no"PROS IconA plus symbol representing positive aspects or benefits.CONS IconA minus symbol representing negative aspects or drawbacks.

More Templates

See Other Templates

servicios financierossugerido

Pruebas A/B

Descubra una forma sencilla de asignar un grupo de prueba para realizar pruebas A/B en sus decisiones.

Explore
servicios financierossugerido

Precios basados ​​en el riesgo

Descubra una forma sencilla de aplicar una matriz de precios basada en riesgo adecuada en función del tipo de cliente.

Explore
servicios financierossugerido

Normas de elegibilidad y política

Descubra una forma sencilla de definir y ejecutar varios conjuntos de reglas y obtener el resultado de la decisión final.

Explore