jeudi 3 septembre 2015

Amazon SWF Flow - Handling timeouts

I'm working on a relatively simple workflow using Amazon's Flow framework for Java. I think I have a decent grasp of everything that's going on right now, but I have one area I'm still uncertain about: how should I go about handling timeouts?

The main timeout with my workflow is the executionStartToCloseTimeoutSeconds on the workflow itself, but I'd imagine the process is the same. It seems that most of the time, when the task times out, it just kind of disappears. I'd like to be able to know when this happens and do something (e.g. send an e-mail or log it somehow).

I've also noticed that it will sometimes generate an error that I can catch in the workflow execution - this appears to be caused by the task being terminated while the decision is being made, and blowing up when registering the decision on a timed out resource (it's an UnknownResourceException). I know how to deal with the latter if needed, but I searched around and couldn't find any example of anything being notified that a timeout happened and doing something.




Aucun commentaire:

Enregistrer un commentaire