I have developted my own Node with the new feature of dynamic ports. I can add ports for the outputs dynamically.
In the NodeDialog I can configure a table for each port, which contains variables for the FlowVariableTable and the DataPortTable.
But if I already have configured some data for the other ports in the NodeDialog and I add a new port, all current values and data in the NodeDialog get lost. Does anyone know to change this behavior of the node or how to safe my configured data in the NodeDialog?
It seems to me that the Node is reset after adding a new port.
actually your configuration should still be available. Could you please try the following.
- Add your new node to the WF
- Open the dialog and make a couple of changes
- Click ok
- Add breakpoints to load in the dialog and the model
- Add your input port
- Check that your data are still stored by the NodeSettingsRO
Are your data/settings still available? If they are not available please double check that you’ve implemented the saveSettings methods correctly.
sorry for the late response.
I double checked the saveSettings and the loadSettings. There everythink works. The Problem only occurs, when I add a new output port, then the data/settings are lost (the settings from the NoteSettingsRO are empty/have the default values).
When I don’t add a port, the loading and saving of the data/settings works always without problems.
This is very very strange.
Could you please confirm that the settings are also empty after you did the following steps:
- Add your node
- Configure it
- Save your workflow
- Close the workflow
- Open the workflow again
- Open the dialog and make sure that your settings correspond to what you’ve saved
- Add the port
- Open the dialog <-- are the settings incorrect?
Thx for your help
Yes, the settings are incorrect.
Before i add the new port, everything was okay, all data/settings are right. But after adding the new port, the data/settings are incorrect/lost.
sent you a PM, as I’m not able to help you any further without having a look at your code. Maybe you could have a look at knime-powerbI (Send to PowerBI node) which does not show the behavior you’re seeing.
Looking forward to hearing back from you