Open jiqicn opened 2 years ago
The simplest way to clean up messy workflows, and that is the only thing that metanodes can do: metanotes are purely used to organize your workflows better. Also note that metanodes created by users can't be uploaded to KNIME Hub.
Components are nodes that contain a sub-workflow, which lets you bundle functionality for sharing and reusing. Components are similar to metanodes but with more functions.
To refer:
Flow variables created inside components will not leave the component unless this is expressly set as an component output, and verse vice, flow variables created in the workflow but outside of the component will not enter the component, unless expressly set as an component input.
A component has a configuration window to setup itself. Also, this window can be customized to some extend by adding configuration notes.
The configuration, widget, and visualization nods inside a components can be organized and displayed within a single view (dashboard) with interactions. Layout is also customizable.
In this way, components can be published for collaboration and reusage. There will be a webpage of the component that can show descriptions of functionalities, input/output, and links to sample workflows that demonstrate the usage of the component.
In KNIME, it's also possible to create workflow as a service that can be called by other workflows. This is done by using the KNIME workflow services set of nodes.
Different from using components which copys all the nodes inside and the configuration to the target workflow, a workflow service is merely referenced. The caller workflow gets to know what to call from the callee workflows, but the exact nodes that will be executed where it is located, and this is hidden to the caller workflow.
Comparing to components, workflow services has the following pros and cons:
To summarize, workflow services are good when splitting a big task into smaller sub tasks that can be performed individually (e.g. collecting data, preparing data, training machine learning models, comparing performance, etc.), while components are more like nodes (with configuration and view) that are highly modularized.
To refer:
It would be nice to have our work (workflows and components) to be uploaded to KNIME Hub. This is the recommended way of sharing works and collaborating with others.
To refer: https://docs.knime.com/latest/hub_user_guide/index.html#collaboration.
It is best to build your shared component in a way that it behaves like you would expect a KNIME node to. This means it should be configurable via the configuration window, have an informative description, and give you meaningful error messages when something fails.
This issue is collecting random ideas for designing the KNIME workflows in our project. so it might not be organized well (can be summarized as a separate document in the future if needed).