Create a initial Node

Hey I want to create a “initial” Node the problem is I dont know how to create a new Data Row.
So the row should have no input but only one output. And in the example it only shows how to create a Node wich has input.

Hi Jonathans,

are you talking about this example from this tutorial? What exactly are you trying and how? Did you try to delete the input port in the NumberFormatterNodeFactory.xml ? That should give you a node without an input port.

Does this help? Don’t hesitate to ask further questions!

Best regards
Steffen

Hey, yea thats the tutorial that i meant. I already deleted the input port. But the problem is that in the execute() function of the tutorial you are accessing the inputTable, wich obviously i dont have if i dont have an Input.
So how to a create a DataRow / Result wich I can return in the execute() function. Because everything is like an interface wich you cant create a new Instance ( InterfaceName name = new InterfaceName) of.

Best regards
Jonathan

You can simply create a new row using the DefaultRow like this:

DataRow row = new DefaultRow(RowKey.createRowKey(idx), cells);
container.addRowToTable(row);

HTH,
Philipp

3 Likes

This helped very much! But “createRowKey()” is deprecated what is the newer version of it?

afair only the one with int argument is deprecated. Just throw in a long and it should be fine. (if you’re only generating one row, it will not matter anyways)

–Philipp

2 Likes

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