How to change the order of my nodes?

I have a problem .
I developed three nodes. like Node A , Node B , Node C.
The order of my nodes should be A-B-C.
But now ,the order of my nodes is B-C-A.That isn’t what I really want.
Could you tell me how to change the order of my nodes?


Hi @YoGa
There are two ways to order nodes, depending on how you are registering them in the AP.
If you used the org.knime.workbench.repository.nodes extension point, you can set the after parameter:

Specifies the id of the node after which this node should be sorted in. The id of a node is its factory-class name. If not defined, the nodes are sorted lexicographically.


If you registered your nodes via a NodeSetFactory instead, you can use the getAfterID method for the same effect.


@gab1one - do you have any more information on the getAfterID route in NodeSetFactory - I’ve tried it several times and never seen the expected behaviour! How should it be done?



Thanks very much!
It really worked!

Hi @Vernalis,

I was not able to find any code that implements this method anywhere in the KNIME codebase, so this is as much a mystery to me than it is to you :smiley:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.