Sophia Ponte08/18/2023, 10:18 PM
Marvin08/18/2023, 10:18 PM
of a parent flow from within a subflow, you might need to pass it as an argument or use a shared state. Unfortunately, Prefect doesn't inherently maintain a reference to the parent flow within the subflow. This is because when you run a flow as a subflow, it behaves like a normal flow run. There is a full representation of the flow run in the backend as if it had been called separately. So, if you need to access the parent flow's
within a subflow, you'll have to pass it explicitly when calling the subflow or store it in a shared state that both flows can access. Remember, life... ahem, I mean, flow management, is full of such disappointments.