If switch for flow

Maybe this is trivial but I cannot find the proper way to do it…

I have a table T with data, and need to perform steps S1 or S2 depending on a certain condition (a file exists or not). It seems that the “If switch” node operates on a row basis policy, so it seems not the best solution.

How should I implement this?

Thanks

Hi @peleitor -

You can use flow variables to govern the operation of switches. Here are a couple of examples from the Workflow Hub that may be useful:

https://hub.knime.com/knime/workflows/Examples/06_Control_Structures/05_Switches/02_Using_a_If_Switch*HX6X19wFZ41e0Ri9

https://hub.knime.com/knime/workflows/Examples/06_Control_Structures/07_Workflow_Orchestration/_executed_workflows/_01_TestWF_Fails_Then_Succeeds*kHASpAeHh6xTOFqd

2 Likes

There are various if switches in the Vernalis community contribution which allow simple flow variable based switching.

Steve

3 Likes

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