Hey Community! Is there a way to wait for another deployment's flow to finish before doing something in our main flow? i.e. I have a deployment/pipeline with three sub-flows A, B, and C, I want to run sub-flow A first, then it should check if another deployment's main flow has finished or not if it has it should trigger sub-flow B. More like a wait_for functionality but instead of tasks or flows within the same deployment, it should wait for another deployment's main flow to finish first.
I am able to come up with a solution using Prefect Orion API where my deployment A takes the name of the second deployment's flow on which sub-flow B depends and then it checks the last execution of the second deployment's flow's state for the current day, if the state is finished, it would go on to execute the sub-flow B, if it's in any of the pending states, it would just hold on and retry for an hour and wait until it completes. it's working okay for now but I think this is a naive approach. I was just wondering if there is any prefect native approach to do this?