That's rights. It's going to be a custom version of NodeRed and you are able to model a flow which contains mainly conversion logic and use it with a communication configuration. One of the nodes is a flow configuration node, which describes the communication of each graph and saves it inside the context. This way we are much more flexible because the communication nodes like http, mqtt will be deleted and reinserted via configuration on deploy.
The only way that worked for me was using the RED.events.emit("deploy") Event with a delay of 500ms. Thats not really reliable, but at the moment the best way to go. I was hoping for an event after the backend has refreshed.
The deletion of the flow-context is not a problem. Im doing it with a own deploy button and calling afterwards the action "deploy-flows", only the shortcut CTRL+D is giving me some problems here, but i havn't searched yet the code for a solution.
The main problem is that the deploy hook is beeing called before everything is really saved and merged and reloaded in the backend. So that my merge in the deploy hook get some timing problems if i do not sleep for 500ms before i merge my additional nodes.