Dynamically passing component as input to another component
Hello KNIME Community,
I’m working on a set of workflows where I have several separate components (A, B, C, D ..), each with its own unique logic and nested sub-components. However, all of these workflows share a common core loop for processing data. The loop logic is identical across all workflows, but each workflow needs to run a different nested sub-component inside the loop.
Instead of duplicating the core loop logic in each of my components, I would like to create a reusable core loop component and dynamically execute different nested sub-components (e.g.,
nested_component_A,
nested_component_B, etc.) depending on the workflow.
My requirements:
I want the core loop to be a separate reusable component that can be used across different workflows/components.
I need to pass the name of the sub-component or sub-component to the core loop and have it execute the corresponding nested logic.
The logic for each sub-component should remain separate (i.e., Component A uses `nested_component_A`, Component B uses `nested_component_B`, etc.), but the looping logic should be shared.
Questions:
*
Is it possible to pass a nested sub-component dynamically into a core loop component ?
*
Is there an example or existing solution with shared loops where different sub-components are executed inside the same loop?
I will appreciate any help.
Thanks in advance,
Aleksandra