* @param stepName the name of the step
* @return the step execution history for the given step
*/
private StepExecutionHistory computeHistory(String jobName, String stepName) {
int total = jobService.countStepExecutionsForStep(jobName, stepName);
StepExecutionHistory stepExecutionHistory = new StepExecutionHistory(stepName);
for (int i = 0; i < total; i += 1000) {
for (StepExecution stepExecution : jobService.listStepExecutionsForStep(jobName, stepName, i, 1000)) {
stepExecutionHistory.append(stepExecution);
}
}
return stepExecutionHistory;
}