To control the state of the parent flow based on the outcome of a subflow, you should know that subflow runs behave like normal flow runs and will block execution of the parent flow until completion. The relationship between a parent and child subflow is tracked by creating a special task run in the parent flow, which mirrors the state of the child flow run.
Although the provided documentation excerpts don't give a precise answer, it's implied that there are ways to capture the state of the subflows and then use that to determine the final state of the parent flow.
Here's what you can consider doing based on the understanding of Prefect flows:
1. Track the state of the subflow runs explicitly within the parent flow by storing the state of the subflow's tasks or by using a special task that represents the child flow run.
2. Use the state of these tracked tasks to conditionally set the state of the parent flow to
Failed
if any of the subflows fail.
To get more specific advice, I would recommend looking directly into the documentation for subflows and flow state handling, or using GitHub to search for related issues where users may have discussed this exact scenario and how to handle it. The documentation link provided should guide you to the section regarding subflows:
Composing Flows - Prefect Docs.