I understand that to create a new node I need to create a Model that extends NodeModel, and create a factory that extends NodeFactory to go with it. The question is, how can I create a meta node? In the older version of Knime there was an abstract base class called MetaNodeModel (and MetaNodeFactory as well) that allows you to do so, but it seems like they have been eliminated in the new release. So is there a substitution approach that allows us to do so? I mean to create a reusable meta-node extension that will appear in the “node repository” view, instead of simply creating a meta workflow.
Ha, I’ve finally figured out the solution myself. For those of you who also have the same question, there is no need to write any java code (other than the entry and exit nodes inside the sub workflow) to create a new meta node. In the new version, there is one more type of extension one can add — the org.knime.workbench.repository.metanode, which creates a meta node automatically once added
The following are the steps in a little more detail :
launch your project (which you are developing )
create a meta node there (just as a normal user would do ) and design/add the sub-flow inside it
in the runtime configuration folder there will be a folder created with the name of this meta node. copy the content of that folder to a folder under your plugin directory…and this way the metanode is copied in your plugin.
add the metanode extension org.knime.workbench.repository.metanode and put in the relevant information as your metanode name and its working directory ( the directory in your plugin where you have copied the metanode ) and your metanode is ready…
Hi Carlos, A shameless self-promotion. :) (Hope once someone from KNIME will create a better description, or a similar wizard to the normal node generator.) Bests, gabor
Description: This description point allows to provide meta node templates in the node repository. In order to create a meta node template do the following:
Create a meta node within KNIME
Copy the referring directory from the runtime workspace
Paste it into your plug-in directory
Add the extension "org.knime.workbench.repository.metanode"
Fill out the attributes: workflowDir:
point to the directory containing the meta node (make sure to add the directory also to the binary build in build.properties name:
The name is displayed as the name for your meta node template in the node repository id:
For internal maintainance category-path:
The path to the category where it is placed within the node repository after:
Optionally specifiy a node after which the meta node template should appear
icon:
The icon is displayed in the node repository description:
describe what your node template does. It is displayed in the node description, when your meta node template is selected