Quick summary : I'd like to trigger a flow from within a function node, then wait for it to complete, either by receiving a message or detecting a change in a context variable.
It may be that the new async mode in v1.0 will help with this, and if so I'm happy to try out the Beta.
More detail : I'm building a number of identical devices based on the ESP8266, and when each powers up it will send its MAC address to a Node-RED based controller. The controller will look up the MAC in a table, and reply with the device's "ID", effectively its MQTT topic. This means I don't have to hard code each device's ID, and if one fails I can substitute another with just a quick edit to the table data file.
However, if a device's message arrives before the table has been loaded into the global context (which might happen after a power outage) I'd like to wait in the lookup function until it's available.
I've tried various flow loops and async functions, but so far can't come up with a workable solution. I've even had occasional infinite loops which needed a controller reboot to get out of
Any suggestions (including updating to v1.0) would be very welcome.