Hi guys,
The context: we're using Node-RED to interact with a conversational API, this means that at some point a custom node calls an endpoint and, when the conversation continues, the API triggers a particular event, at this point the flow should resume from the point it stopped.
The problem is with the code below
function createNodeInSubflow(subflowInstanceId, def) {
let node = clone(def);
let nid = redUtil.generateId();
the id of a node inside a subflow is random, it changes at every restart, which makes impossible to use it as a reference for resuming the flow in the same point it was interrupted calling the API (in case Node-red restarts the original id is lost).
Is there a solution for this problem (having a deterministic reference of what node it's execute in the flow) which doesn't include
- patching the core of Node-RED
- keeping the "status" of the execution inside Node-RED (not a viable solution for us)
Thanks and sorry if this post is a little bit vague
Guido