I remember that earlier (<NR-1.0.5) there was a problem when parent context variables were accessed in a subflow right in the first function node. Is it possible that it can still happen (NR-2.0.5 or 1.2.9)? I'm chasing quite a rare issue when in the first function node of a subflow of a subflow (!) I sometimes get undefined after a flow.get("$parent..."). However, the flow context variable is set in the parent subflow almost before calling the failing subflow and I'm pretty sure that there is no concurrent node being executed that could set that variable undefined since the parent subflow is behind a queue gate.
I attached the exported parent subflow with all its sub-subflows as it's too big to paste it here but it should look like this once imported:
The failing subflow is called 'calculate channel sum' where the error is: TypeError: cannot read property 'spectrum' of undefined. The context variables that cannot be accessed (most probably only the first one) are set in the function node FileSeparate_Diagram as ch_0 ... ch_7. Any comments are welcome
flows.json (38.0 KB)