Last week I opened up a support case related to calling sub-workflows and not being able to see the widgets on the KNIME WebPortal. This has been answered by @Alice_Krebs.
As a workaround we’ve implemented the use of many many case switches to achieve the required results, but unfortunately we came across a big issue, which is the unwanted execution of nodes/components inside components of inactive branches.
In the attachment you will find a test workflow which shows the issue:
Inactive Branch issue.knar (38.6 KB)
The workflow contains 3 branches:
Case switch port 0: Active branch
Case switch port 1: Inactive branch #1 (including the issue)
Case switch port 2: Inactive branch #2 (including the undesired workaround)
The issue is in the inactive branch #1, where the main component is connected to the inactive branch, but the inner component is still being executed. Where the expectation was all nodes/components inside an inactive branch will remain inactive and are skipped during the execution.
There is an undesired workaround for this, which is connecting all nodes/components within another component to the flow variable output of the component input:
This way the inner component is inactive and will be skipped. This brings additional complexity (and it hurts the eyes for components containing many nodes) when creating components. We have introduced KNIME for little bit over a year and basically we can’t re-use many of the 100+ components in the way they are created now in combination with inactive branches (e.g. with case switches and empty tables), as using these in an inactive branch will either crash the component (1), consume a lot of unnecessary processing/memory power (2), or worst of all lead to incorrect results of a workflow (3).
Is this behavior of the inactive branches as it is intended? Is there a more efficient workaround possible?
I’m looking forward to a solution. Thanks in advance!
Kind regards,
RKrom