Hey, quick question: Is there a way to access resu...
# ask-community
b
Hey, quick question: Is there a way to access results as documented here https://docs.prefect.io/core/idioms/task-results.html when starting a flow with StartFlowRun?
k
Hey @Bastian Röhrig, do you need it during the Flow or do you need it after the Flow? Could you tell me more about what you’re trying to do?
b
I would need it after the flow, I am thinking about doing something like this
Copy code
run_module = StartFlowRun(flow_name="run_module", project_name="tutorial", wait=True)

with Flow("flow-of-flows") as flow:
    params = ...    
    results = run_module.map(parameters=params, run_name=get_names())
    do_something.map(results)
    # I would like to do something with the results of the tasks
I know that I can see whether or not the child flows were successful, and I think that information might be enough for me to build a workaround if i cannot access the results.
k
Ah ok. Some new tasks were added in 0.15.0 to support this as seen here . Check the part about “Sub-flow result passing”
b
This looks like exactly what I want to do, thank you 🙂
👍 1