Suppose you have a Workflow and you suspend it while one of the actions is still RUNNING. The underlying MR/Pig/etc job will continue running (as expected, because we can't pause those). However, if that job finishes while the workflow is SUSPENDED, the CallbackServlet will receive the callback, but the ActionCheckXCommand won't update the action:
If you then resume the workflow, the action will stay RUNNING for up to 10 minutes (the default fallback polling interval), at which point the ActionCheckerService will run an ActionCheckXCommand that will pass, check the job, and finally mark the action as SUCCESSFUL.
We should fix this by one of the following:
- ResumeXCommand should also queue a ActionCheckXCommand (if the workflow was SUSPENDED) so we don't have to wait for the ActionCheckerService
- ActionCheckXCommand's precondition check should allow SUSPENDED workflows