https://prefect.io logo
a

Aaron Rnd

02/21/2022, 4:56 PM
Hi guys, i have a question. Is it possible to start another flow, once a task in another flow is completed. For illustration :- Flow A Task 1 > Task 2 > Task 3 Flow B (once Task 2 in Flow A is completed on success, run Flow B) Task 1
z

Zanie

02/21/2022, 4:57 PM
Yep! You can use the
create_flow_run
task and set it as a downstream of task 2 https://docs.prefect.io/api/latest/tasks/prefect.html#create-flow-run
❤️ 1
a

Aaron Rnd

02/21/2022, 5:03 PM
By using create_flow_run, does that mean a new flow is created everytime the parent flow runs? Or the flow_id & flow_name parameter in create_flow_run is used to look up on an already registered flow and run it?
Thanks @Zanie
z

Zanie

02/21/2022, 5:05 PM
The flowid/name are used to look up the registered flow and create a run that an agent will submit for execution
❤️ 1
a

Aaron Rnd

02/21/2022, 5:10 PM
That make sense 👍
3 Views