i want to active flow A , but flow B are in process and has same function as flow A too. So I want to complete flow A first then flow B will be available automatically.
k
Kevin Kho
12/30/2021, 4:19 PM
Hey @Anh Nguyen, it sounds like you should just make a main Flow that calls flow A and then calls Flow B with the
create_flow_run
and
wait_for_flow_run
tasks
Copy code
with Flow(...) as main_flow:
flowA = create_flow_run(flow_name="...", project_name="...")
waitA = wait_for_flow_run(flowA)
flowB = create_flow_run(flow_name="...", project_name="...", upstream_tasks=[waitA])
a
Anh Nguyen
12/30/2021, 4:26 PM
yes! At time, Flow A is processing. I kick off flow B by call API. And i need flow A is finish then flow B will be start. How to do that? thanks you
k
Kevin Kho
12/30/2021, 4:33 PM
By using the
wait_for_flow_run
task. Or you can make flow B check if flow A is done in the state handler
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.