Hi
@Mikael, this is certainly possible, but without knowing more about how your flow looks, I can't give you more specific advice. A few general notes:
• Prefect has triggers, which decide if a task can run based on the state of upstream tasks:
https://docs.prefect.io/core/concepts/execution.html#triggers. By default, a task will run only if the upstream tasks all succeeded. Through the use of triggers, you could set a task downstream from your tasks that may fail to determine what the downstream state should be.
• The state of a flow run is determined by the state of its reference tasks:
https://docs.prefect.io/core/concepts/flows.html#reference-tasks. By default, reference tasks are all tasks that have no downstream dependents. If needed, you can configure the reference tasks to base the final state on a different set of tasks.
By combining these two components (triggers on tasks and reference tasks on flows) you generally can get whatever state outputs you want.