Removed subflow ID auto-generation, now prefixes the nodeId with the subflow id

This commit is contained in:
Steve Walsh
2023-01-03 11:42:16 +00:00
parent f4f012b531
commit 40ebf0c3ec
3 changed files with 7 additions and 3 deletions

View File

@@ -329,10 +329,11 @@ function createSubflow(sf,sfn,subflows,globalSubflows,activeNodes) {
var createNodeInSubflow = function(def) {
node = clone(def);
var nid = redUtil.generateId();
node_map[node.id] = node;
node._alias = node.id;
node.id = nid;
// Stop generating new node ids for nodes inside subflows
// instead we prefix it with the subflow node id, which is unique
node.id = sfn.id + '-' + node.id;
node.z = sfn.id;
newNodes.push(node);
}