Switch

Use the Switch node to route a workflow conditionally based on comparison operations. It's similar to the IF node, but supports multiple output routes.

Node parameters

  • Mode : select whether to define the conditions as rules in the node, or as an expression, programmatically.
  • Routing Rules : appears when you select Mode > Rules . Add comparison conditions using the dropdown. The available comparison operations vary for each data type.
  • Number of Outputs : appears when you select Mode > Expression . Set how many outputs the node should have.
  • Output Index : create an expression to determine which node output to send data to.

Node options

  • Fallback Output : choose how to route the workflow when none of the conditions match.
  • Ignore Case : whether to ignore letter case.
  • Less Strict Type Validation : enable this if you want Mosaic Workflows to attempt to convert value types based on the operator you choose.
  • Send data to all matching outputs : enable this to send data to all outputs matching the conditions. When disabled, Mosaic Workflows sends data to the first output matching the conditions.

Related resources

Refer to Splitting with conditionals for more information on using conditionals to create complex logic in Mosaic Workflows.