Ensure subflow instances keep track of their groups

This commit is contained in:
Nick O'Leary 2023-11-29 16:12:12 +00:00
parent a55554193b
commit fb54c05d9f
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -73,9 +73,20 @@ class Subflow extends Flow {
id: subflowInstance.id, id: subflowInstance.id,
configs: {}, configs: {},
nodes: {}, nodes: {},
groups: {},
subflows: {} subflows: {}
} }
if (subflowDef.groups) {
// Clone all of the subflow group definitions and give them new IDs
for (i in subflowDef.groups) {
if (subflowDef.groups.hasOwnProperty(i)) {
node = createNodeInSubflow(subflowInstance.id,subflowDef.groups[i]);
node_map[node._alias] = node;
subflowInternalFlowConfig.groups[node.id] = node;
}
}
}
if (subflowDef.configs) { if (subflowDef.configs) {
// Clone all of the subflow config node definitions and give them new IDs // Clone all of the subflow config node definitions and give them new IDs
for (i in subflowDef.configs) { for (i in subflowDef.configs) {