Muddassir Shaikh

02/09/2022, 8:59 AM
Hi, I have a Flow_1 which runs on a Agent_A (machine A), after completing few task, Flow_1's task has start/trigger another flow Flow_2's task on another Agent_B (machine B). Each Code of Flow_1 and Flow_2 are present on different machines(Agent A and B). Basically Flow_2 has tasks whose upstream task are present in Flow_1. I have read about flow_to_flow in prefect but that works for 1 Agent and cannot be mapped for Flow_1.task_A => Flow_2.task_B . How can i achieve this ?

Kevin Kho

02/09/2022, 2:07 PM
Hi @Muddassir Shaikh, flow of flows can work for multiple agents. Each run is created and then that flow run will find a matching agent. For the upstream in another Flow, you have two options, you can use the KV Store and persist some kind of flag. task_B can look for the flag before starting. Otherwise you likely need to use the GraphQL API, query for the latest run of Flow 1.task_A, find the state, and then when it’s done run Flow2.taskB