I have a main flow with multiple sub flows, where ...
# prefect-community
m
I have a main flow with multiple sub flows, where each sub flow is expected to run one after the other. Ideally if one of them fails, the rest shouldnt execute and that was how it was. However, when I pass the argument "return_state=True" to the subflows, it continues the execution of the next flow even if the previous one has failed. Is there a workaround with this?
c
with return state=True, you are changing the return from a result / future object, to a state ; all flows return a state (failed, succeeded, etc.)
What are you trying to accomplish with return_state=True?
m
send mails on failure
j
@Malavika S Menon I’m not sure if you’ve resolved this yet or not, but I believe you can retrieve the state from the PrefectFuture object … here’s the API docs that give some examples of that… https://docs.prefect.io/api-ref/prefect/futures/