final long jobExecutionId;
final long timeout = Long.getLong(JobExecutionImpl.JOB_EXECUTION_TIMEOUT_SECONDS_KEY, JobExecutionImpl.JOB_EXECUTION_TIMEOUT_SECONDS_DEFAULT);
try {
jobExecutionId = jobOperator.start(jobXml, null);
final JobExecutionImpl jobExecution = (JobExecutionImpl) jobOperator.getJobExecution(jobExecutionId);
jobExecution.awaitTerminatioin(timeout, TimeUnit.SECONDS);
if (!jobExecution.getBatchStatus().equals(BatchStatus.COMPLETED)) {
throw new BatchRuntimeException(String.format("The job did not complete: %s%n", jobXml));
}
} catch (InterruptedException e) {