Troubleshooting
Problem
How do you develop a sequence job that that has an exception handler link to show an aborted/restarted status in IBM InfoSphere DataStage?
Symptom
If when trying to develop a sequence job that should abort if any of the child jobs being called abort, the status of the sequence may be Finished/Restartable. This is usually because the design includes an exception handler link to perform a task upon a child job's failure. For example, this task could be sending an email notification. If the expected status/behavior of the sequence is that the sequence reports the status of Aborted/Restartable, this technote suggests a possible design solution.
Figure A depicts a possible situation. In this case, Job2 fails, however, the exception handler handles the failure and this sequence would finish with a status of Finished/Restartable.
Resolving The Problem
This is expected behavior from the sequencer as the sequence design handles the exception of a child job failing, therefore, the sequence is in a finished state, not an aborted state. However, It is still possible to restart the sequence and resume at the last checkpoint.
To achieve an aborted/restartable status for the sequence design, the sequence needs to be aborted even though the exception is handled. One way to achieve this is the following:
- Add a Terminator stage to the end of the exception handler path in the sequence.
- Set the Terminator stage to "Abort without sending STOP requests" and "Wait for all jobs to finish" set. This will ensure the sequence will always aborts when it gets into the exception handler.
In order for the sequence to be restartable the following compilation options must be set:
- Add checkpoints so sequence is restartable on failure
- Automatically handle activities that fail
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21587751