So in Prefect 2, task objects have a handle `submi...
# prefect-community
d
So in Prefect 2, task objects have a handle
submit()
method that lets you create task objects and them submit them directly, using
wait_for
to specify dependencies. Is there any similar mechanism for sub flows? I am interested in launching a "subflow" but without directly calling the annotated flow method, because I don't know which method I'm calling until runtime. For example, I would like to do this:
Copy code
result = make_rpc_call()
newflow = Flow(
   name=result.name,
   parameters=result.parameters,
).submit(wait_for=[...])
is this possible?
1
k
Hi David, the
.submit
is not available yet for Flows and you can track the status on this issue. Until then you can use the
run_deployment
command to trigger the subflow.
d
Awesome thanks!