Hi all, I am trying to run multiple linked StartFl...
# ask-community
j
Hi all, I am trying to run multiple linked StartFlowRuns that share results from some of the tasks from one flow to the next, I was looking at the previous answer (https://prefect-community.slack.com/archives/CL09KU1K7/p1607733221071000?thread_ts=1607727047.066800&cid=CL09KU1K7), but it is not working for me as StartFlowRun returns a Task not a State in my instance. Is there a new solution for this?
z
Hey @Justin Chavez -- there's an open issue for this at https://github.com/PrefectHQ/prefect/issues/4124 and we're actively exploring a solution but do not have one yet.
The
StartFlowRun
task indeed returns the flow_run_id or nothing now and not a
State
object. I'll take a look at the feasibility of returning something when
wait=True
Ah because it
raises
the final state which is captured by the task runner it'll return a
SUCCESS
state
j
Thank you for the reply!
Sounds like it might take some time before a general solution is built
z
Indeed it's a hard problem 🙂
That it's returning a
Task
indicates that you're using it wrong btw, since it's a
Task
class you need to initialize it once to configure it then call it again to add it to your flow e.g.
Copy code
run_my_flow = StartFlowRun("foo", "bar")

with Flow("test") as flow:
    result = run_my_flow()
    do_something(result)