} else {
if (null != jobRecord.getExceptionHandlingAncestorKey()) {
cancelChildren(jobRecord, null);
// current job doesn't have an error handler. So just delegate it to the
// nearest ancestor that has one.
Task handleChildExceptionTask = new HandleChildExceptionTask(
jobRecord.getExceptionHandlingAncestorKey(), jobRecord.getKey(),
jobRecord.getQueueSettings());
updateSpec.getFinalTransaction().registerTask(handleChildExceptionTask);
} else {
rootJobRecord.setState(State.STOPPED);