Thanks @dceejay @knolleary and @Steve-Mcl for all your comments
I understand that there is currently no way to inject messages directly via API into a specific Flow. That's not so nice for my use-cases (from my point of view).
After reading the blog https://nodered.org/blog/2019/09/20/node-done I was expecting that this should be possible, as it seems that the
node.send() seems to be exactly the function I would like to call externally. So is the issue only, that this node-function is not exposed via API?
Let me visualize the only way I think is currently possible (visualization is not great, but should help to understand, I am aware that I can use groups and sub-flows):
I have 3 independen processes doing a lot of stuff not relevant here. Process A has a 1-step approval process, process B has a 3 step approval process and process C has also a 1-step approval process.
A visualization would look like this:
But I would intuitive like to have a flow like this:
There are 2 things I don't like on the first method:
a) The dependency to the input module, so whenever I add a email-approval-node I have to do a modification on the decision object and a link to the continue of the process (approval-stage-done).
b) The wires are confusing, as there is no wire from request-approval to approval-done but the wires to the decision object. For technical reasons thats clear, but I want to have a generic "approval" node, to perform an abstraction and hide technical details (same as we do using with each node).
Do you see any other option? Do you think that there could be the chance to extend node-red API allow sending a message to a specific node? So far I don't get the difference to input nodes. Actually they send also messages on their position to the next neighbours.
Thank you all very much for your patience with me, sorry for asking questions that might show missing understanding...