Preferential workflow control

I have two parallel lines in one workflow, one writing out an Excel file, another writing out image data. The analysis scenarios would be that either 1. the Excel file will be written, 2. the image data will be written, or 3. both the operations will be executed. Is there a node existing for this in Knime?

Hi,
Welcome to the KNIME Forum! Yes, there are different nodes for such flow control. You can use a CASE Switch Start, IF Switch, End IF, and others to control if branches should execute or not.
Kind regards
Alexander

2 Likes

Take a look at this YouTube video for some possible help with switches.

3 Likes

I have no idea how your workflow is structured, but the following workflows should be adaptable for your use. The first permits manual selection of the output(s). The second automatically selects the output(s) based on employing a Rule Engine node which consumes upstream data. Obviously, you’ll need to write rules which fit your workflow.

3 Likes

Thanks a lot for the sample workflows, is the end if node needed for the case switch node to work ?

The purpose of the Endif node is to be able to accept two possible inputs from the Case Switch node. There may be a way to omit it, but I don’t see the point. At worst it does no harm.

Hi,
An End IF is needed if you want to merge two branches of which one may be inactive. If you keep the branches separate, there is no need for the End IF.
Alexander

1 Like

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