I am just having an issue for which maybe you’ve got a good solution.
Imagine that there is a workflow that has two branches. On certain circumstances one of them is inactive, however both produces exacly the same table spec so flow can continue for that very point.
I tried to create a new node (I named it Branch joiner) which has two inputs and one of them, and only one, can be inactive so the node should return the table of the active one.
Problem is that, due to the architecture of NodeModel, it does not support inactive branches even implementing InactiveBranchConsumer.
When NodeModel executes the internal configure (https://github.com/knime/knime-core/blob/be4a5be7fdd139930309ad0aecab02aa20ecc356/org.knime.core/src/eclipse/org/knime/core/node/NodeModel.java#L1086), it expects a valid PortObjectSpec as input which throws an exception in case of one input is inactive.
Is there any way to solve this problem? Any node I am actually missing that works as branch “joiner”? (not confuse with table joiner).
Just to add something more graphical:
I would like to continue execution with table created in Node 3…
What about the CASE Switch Data End node. Does this gives the results your are after?
Many thanks for your answer, that’s exactly what I am looking for!
Something interesting to add here is that CASE Switch only “reads” data or variables depending on the node you are using.
@HansS in your example above, I would be losing the variables that come from the active branch, and only keeping those connected to the input table port.
However, I will try to implement a node that does both things at the same time.
Ah I see. Maybe it is my misinterpretation of “same table spec”, in the question from @isoubelet “[quote=“isoubelet, post:1, topic:15494”]
however both produces exacly the same table spec so flow can continue for that very point
I thought the number and names of the columns in both branches are identical. But they are / can be different.
did you try the End If node? It also allows you to join two branches and supports flow variables as far as I know.
Thanks for answering. Works as you described.
It’s interesting how one can misinterpret a node, because I thought that an END IF strictly requires an IF switch…
Anyways, thank you both, your suggestions completely solved my problem.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.