Ensure flow property is set on sf instance nodes so NR_SUBFLOW_PATH can be evaluated

This commit is contained in:
Nick O'Leary
2025-10-09 14:42:27 +01:00
parent 624e71a7eb
commit 34c59a58e5

View File

@@ -268,6 +268,9 @@ class Flow {
try {
var subflowDefinition = this.flow.subflows[node.subflow]||this.global.subflows[node.subflow]
// console.log("NEED TO CREATE A SUBFLOW",id,node.subflow);
// Ensure the path property is set on the instance node so NR_SUBFLOW_PATH env is evaluated properly
Object.defineProperty(node,'_path', {value: `${this.path}/${node._alias||node.id}`, enumerable: false, writable: true })
this.subflowInstanceNodes[id] = true;
var subflow = Subflow.create(
this,