Malavika S Menon

10/14/2022, 8:41 AM
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?

Christopher Boyd

10/14/2022, 2:13 PM
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?

Malavika S Menon

10/15/2022, 8:47 AM
send mails on failure

Jarvis Stubblefield

10/17/2022, 6:06 PM
@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…