genericworkflownodes / GenericKnimeNodes

Base package for GenericKnimeNodes
https://github.com/genericworkflownodes/GenericKnimeNodes
Other
15 stars 16 forks source link

strange propagation of inactive maked ports #145

Closed timosachsenberg closed 7 years ago

timosachsenberg commented 7 years ago

image

jpfeuffer commented 7 years ago

What was set as Inactive and what was propagated?

timosachsenberg commented 7 years ago

The setting on InternalCalibration is how I activated/inactivated the ports. Strange things happen at the ZipLoopEnd

jpfeuffer commented 7 years ago

Does it work if the last port of InternalCalibration is not Inactive? The propagation rules are setup by KNIME. Actually it might not be so strange. If any of the inputs is inactive, the node is inactive, too. I don't know if KNIME respects optional inputs.

jpfeuffer commented 7 years ago

https://tech.knime.org/forum/knime-developers/optional-input-port-and-if-switch

timosachsenberg commented 7 years ago

ok so its kind of a feature / bug will close for now

jpfeuffer commented 7 years ago

Yep. I replied on the forum entry. Let's see what the KNIME guys think. I will also link @alexanderfillbrunn here. Maybe he can give it a push internally ;)

AlexanderFillbrunn commented 7 years ago

I asked the guys at KNIME and will report back once I hear something.

AlexanderFillbrunn commented 7 years ago

I got the response that this behavior is expected. For normal table ports there is the "End If" node that can sometimes be used in conjunction with an empty table at one input port and the active/inactive table at the other. However, this only works when the optional input of the following node can handle an empty table properly. Would it be possible to have a similar node with your file ports? Can a port contain an empty file list?

jpfeuffer commented 7 years ago

Okay, I see what you mean. Yes we could construct empty file lists that are used to propagate when an EndIf encounters a deactivated port. I would have to look up the behaviour of optional inputs when they receive an empty list but it should be possible to give a warning and as a default executed without that input. Minor drawback: EndIf sounds unintuitive and only takes table ports right? Maybe we can write a quick GKN version with another name.

AlexanderFillbrunn commented 7 years ago

Yeah, a different node makes sense, this is what I meant with "similar node with your file ports". You could call it "Inactive to Empty" or something like that. If you only use it for transforming inactive ports, you may also only have one input instead of two like the "End If".

jpfeuffer commented 7 years ago

True. Good idea.