Hi,
I am trying to get the Flow Info within my custom node on input event as follows:
this.on('input', function (msg, nodeSend, nodeDone) {
console.info(node.name + " processing start");
node.start_time = Date.now();
console.debug("Capturing active flow details - begin");
const activeWorkspaceId = RED.workspaces.active();
node.activeflow = RED.nodes.workspace(activeWorkspaceId);
if (!node.activeflow) {
// this is probably a subflow
node.activeSubflow = RED.nodes.subflow(activeWorkspaceId);
console.debug(node.activeSubflow.info);
} else {
console.debug(node.activeflow.info);
}
});
However I am getting error as follows:
%s - %s 30 Jun 12:07:12 [error] TypeError: Cannot read property 'active' of undefined
Kindly help with this issue.
Regards