Sharath Chandra
04/26/2022, 10:02 AMwith Flow("Master", schedule=schedule, run_config=master_run_config) as flow:
register_graph_flow_run_id = create_flow_run(
flow_name=register_graph.flow.name,
project_name=project_name,
task_args={"name": register_graph.flow.name},
)
wait_for_register_graph_flow_run = wait_for_flow_run(
flow_run_id=register_graph_flow_run_id,
raise_final_state=True,
task_args={"name": f"Wait {register_graph.flow.name}"},
)
register_bots_flow_run_id = create_flow_run(
flow_name=register_bots.flow.name,
project_name=project_name,
task_args={"name": register_bots.flow.name},
)
wait_for_register_bots_flow_run = wait_for_flow_run(
flow_run_id=register_bots_flow_run_id,
raise_final_state=True,
task_args={"name": f"Wait {register_bots.flow.name}"},
)
register_bots_flow_run_id.set_upstream(wait_for_register_graph_flow_run)
The flow definitionAnna Geller
04/26/2022, 11:23 AMDoes the state of the subflow define the state of the main flow ?It depends. The reference tasks determine the final state of a flow run. If you don't set reference tasks explicitly, then the last task run state determines the state of a flow run. You can set this using:
flow.set_reference_tasks([your_task])