Converted the failed job handler to use the activity registry to
get the instructions on what to do on a failure.