Hi! In prefect 2.0 I notice that if we pass `futur...
# prefect-community
a
Hi! In prefect 2.0 I notice that if we pass
future
to another task, the task automatically receives the future result value as a variable which is the expected behavior. However this is not the case when we have a flow with subflows and we pass a prefect state from a flow run (that has a return value) to a flow downwards (where we should manually call `.result().result()`to extract the flows result's value) Is this the expected behavior? If yes this seems a little bit counter intuitive to me, where in the case of passing data from tasks Prefect automatically extracts the result value but not when this result is coming from a flow run
1
b
Hi Andreas, to my knowledge you should be able to pass prefect state info between flows and subflows. Within the main flow, you can store the subflow run object as a variable and inspect the result. Here is an example of what methods can be used to inspect flow run states. Here is another example for how to construct subflows and use .result() to retrieve data returned by a flow. Here is documentation regarding final state determination of flows.