Hi everyone,
I’m currently building a set of custom nodes in a shared library, and I’m using the flow context to store a class instance that should be accessible across nodes within the same workflow.
In one of the nodes, I’m doing something like this:
const flowContext = this.getContext('flow');
flowContext.someClassInstance = new ClassInstance();
This works perfectly across other nodes within the same workflow, since they can access the same flow context.
However, when I invoke a subflow as part of the main workflow, the nodes inside the subflow cannot access the flow context that was set in the parent workflow. It seems like the subflow execution has its own isolated context.
Question:
Is there a way to access the parent workflow’s context inside a subflow, especially when working with custom nodes? Or is there a recommended way to share data (like an initialized class instance) across nodes in both parent and subflow workflows?
I’m looking for a clean and reusable approach within a node library.
Thanks in advance!

