Nikol
September 23, 2021, 6:58pm
1
Hi, I try to create my custom node. I can manipulate the number of inputs and outputs, but how do I change its type?
I saw on GitHub that there was a line added to the XML NodeNameNodeFactory.xml
in the <ports>
tag:
<dynInPort insert-before="0" name="File system connection"
group-identifier="File System Connection">
The file system connection.
</dynInPort>
(I need it to be a File system port)
But that does not seem to change the type.
Any ideas? Thanks!
1 Like
gab1one
September 24, 2021, 7:23am
2
Hi @Nikol ,
welcome to the KNIME Community
You were actually looking in the right package, but in the wrong class. Take at the NodeFactory
knime-base/CreateDirectory2NodeFactory.java at master · knime/knime-base · GitHub .
This is the special case if you want dynamic ports. If you want to use static ports, all you need to do is to extend the PortObject[]
constructor in the NodeModel
, see here:
best,
Gabriel
1 Like
Nikol
September 25, 2021, 1:01pm
4
Hi! Thank you for your answer,
I changed the NodeModel
and NodeFactory
accordingly (used the second example). But how do I make the input port File System port (which could read data from the SSH Connector node )?
Thanks
Nikol
gab1one
September 27, 2021, 7:59am
5
Hi Nikol,
In that case you need to use FileSystemPortObject.TYPE
best,
Gabriel
system
Closed
October 4, 2021, 7:59am
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.