i want to active flow A , but flow B are in proces...
# ask-community
a
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
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
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
By using the
wait_for_flow_run
task. Or you can make flow B check if flow A is done in the state handler