Hi, I'm trying to find out how I can set up a flow...
# prefect-community
s
Hi, I'm trying to find out how I can set up a flow that depends on some other flow , but where the other flow is defined elsewhere say in a separate repo. Can I for example reference the flow id in the dependent flow? Or how should I do that?
k
It would be easiest if you had a parent flow that triggered the children flows so that you have the flow id. Have you seen this page?
👀 1
s
This collects the state of the flow that needs to run first?
flow_a = create_flow_run(flow_name="A", project_name="examples")
?
Maybe a different but related question: if I have a continuous loop that stores some state and some other process picks up that state in a separate flow. Is there a way to automatically check how old the state is of the first flow? Ideally I would like to know that the state of the first process is up-to-date (definition depends a bit on the individual case)
@Kevin Kho I think I missed that page. Thanks!
k
flow_a will be an id there. not a state. you need wait_for_flow_run to get the state. There is an argument like raise_final_state
maybe you can write the update time of the state in the KV Store ?
s
Let me think about that. Thanks!
I can't use the completed time of the Loop task (referring to the prefect 1 setup atm)
k
You can if you query it from the GraphQL API
Check this or this