Designing a separate flow according to multiple IF conditions

Hello ,
I have 3 use cases, 1,2,3. I ask the user to select use case scenario via the widget (I am giving options like scenario 1, scenario2, scenario3) I want to attach three different processing nodes further based on the scenario selected .
Jave if node can help me get this but there are only two output tables (0,1) I want three possible different flow streams based on IF condition selected from user.
Is this possible in knime? How?
Something like the picture below (I have used Java if node to decide the stream of my workflow/direction of workflow)

One way is to simple code it based on if else condition in Python Node I am looking for another way out!
TIA!!

Have you considered using a Case Switch (https://docs.knime.com/2020-07/analytics_platform_flow_control_guide/index.html#if-and-case-switches) ?

3 Likes

Thanks @elsamuel That helped . Was wondering If I have use case having 4 options can this be handled in any ways. Case switch handles only 3 output scenarios. I know my question was asking only for 3 possible ports but this just got me curious?:slight_smile:

1 Like

Hello @oshin,

you simply stack Switch nodes :smiley:

MultipleSwitches

And build underlying logic where one choice maps to one flow variable for each Switch node. In the end one choice maps to multiple flow variables.

Br,
Ivan

2 Likes

Oh yeah great works :slight_smile: Thanks.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.