}
return stepExecution;
}
private JobExecutionHistory computeHistory(String jobName, int total) {
JobExecutionHistory jobExecutionHistory = new JobExecutionHistory(jobName);
try {
for (JobExecution jobExecution : jobService.listJobExecutionsForJob(jobName, 0, total)) {
jobExecutionHistory.append(jobExecution);
}
}
catch (NoSuchJobException e) {
throw new IllegalStateException("Cannot locate job=" + jobName, e);
}