I am creating a custom node which has some internal variables which I want to persist across restarts and I am trying to find an elegant way to do that in paradigm. The first time you load the node, you can set the values using the editor, but there is an option for the node to learn and update those default values automatically - I want those learned values to persist.
I have looked into the persist node and it can work, but I would prefer for the the learned variables to show up in the editor and not get set when the flow starts. I was thinking about storing the variables in global context and changing settings.js for the global context to persist and then maybe I can grab from the global context in "oneditprepare" - I am not sure if this will work though. If the node works how I want it to, I will release it for others to use and want it to work with minimal configuration - if the end user has to change a global setting (which could potentially break other nodes) or manage the persistence themselves (with persist nodes) it will not be as universal.
I just looking for ideas which I can research more and test, I'm not trying to post a generic "solve my problem for me" type of post. Hopefully you all have ideas.