The terminal state handler has access to the state of the reference tasks.
s
Saksham Dixit
05/10/2021, 4:55 PM
I actually want to send an email out specifying which task failed which made the flow fail
z
Zanie
05/10/2021, 4:56 PM
Yep! That's exactly the use-case for this handler.
s
Saksham Dixit
05/10/2021, 4:56 PM
so I wanted all tasks instead of just reference tasks..
z
Zanie
05/10/2021, 4:56 PM
A task will not cause the flow to fail unless it is a reference task
s
Saksham Dixit
05/10/2021, 4:57 PM
Oh okay thanks
z
Zanie
05/10/2021, 5:00 PM
There is a possible exception to this which would be an upstream task failing causing a downstream (terminal/reference) task to fail. I believe that would be in the task's state message though. Let me know if you run into issues, this is a relatively new feature.
s
Saksham Dixit
05/10/2021, 5:07 PM
yeah that's an approach we can take, thanks for that, but any thoughts on why the result attribute of a flow's state handler be empty