Thread
#prefect-community
    s

    Sander

    4 months ago
    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?
    Kevin Kho

    Kevin Kho

    4 months ago
    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?
    s

    Sander

    4 months ago
    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!
    Kevin Kho

    Kevin Kho

    4 months ago
    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

    Sander

    4 months ago
    Let me think about that. Thanks!
    I can't use the completed time of the Loop task (referring to the prefect 1 setup atm)
    Kevin Kho

    Kevin Kho

    4 months ago
    You can if you query it from the GraphQL API
    Check this or this