Node Model Settings Duplicate

Hello! I develop a custom knime node, but I get into a trouble -  when I connect into a workflow two nodes of this type  consecutively the second nodes settings overwrite the previous node settings. What I am doing wrong? 

Hey natashullea,

Hard to tell exactly what went wrong there, but I suspect you did not write/read the settings into/from the settings object in saveSettingsTo(NodeSettingsWO)/loadSettingsFrom(NodeSettingsRO, DataTableSpec[]).

If that's not the case/doesn't solve your problem, can you share your code from the save/load methods? (You can change of course IDs/variable names that shouldn't become public)

Best,
Ferry

Hey Ferry,
Yes of course.

    protected void saveSettingsTo(final NodeSettingsWO settings) {

        param1.saveSettingsTo(settings);
        param2.saveSettingsTo(settings);
       param3.saveSettingsTo(settings);
    }

 

    protected void loadValidatedSettingsFrom(final NodeSettingsRO settings) throws InvalidSettingsException {

        param1.loadSettingsFrom(settings);
       param2.loadSettingsFrom(settings);
       param3.loadSettingsFrom(settings);
    }

 

Thnaks!

It also should be mentioned that param 3 is of boolean type.

That looks just right. Is it the same in the NodeModel?

Could it be that you made the fields static?

Yes... By mistake I made the fields static. Thank you very much for help!

Hi,

I have a question. In my NodeDialog class I add a DialogComponentColumnNameSelection dialog component which uses data from Input Port.

The InputPort object value is changed at every KNIME workflow execution. The problem is that the value stored in the next KNIME node remains same as for the first time workflow execution.

Thanks. 

Hi,

I have a question. In my NodeDialog class I add a DialogComponentColumnNameSelection dialog component which uses data from Input Port.

The InputPort object value is changed at every KNIME workflow execution. The problem is that the value stored in the next KNIME node remains same as for the first time workflow execution.

Thanks. 

Hey natashullea,

can you provide some more information about what you are trying to achieve and what is going wrong? Because from what you write I would assume that another static field is causing the issues.

Best,
Ferry