extraProps.put("listBatchJobExecutions", jobExecutions);
if (executionId != null) {
JobOperator jobOperator = BatchRuntime.getJobOperator();
JobExecution je = jobOperator.getJobExecution(Long.valueOf(executionId));
if (instanceId != null) {
JobInstance ji = jobOperator.getJobInstance(Long.valueOf(executionId));
if (ji.getInstanceId() != Long.valueOf(instanceId)) {
throw new RuntimeException("executionid " + executionId
+ " is not associated with the specified instanceid (" + instanceId + ")"
+ "; did you mean " + ji.getInstanceId() + " ?");
}
}
jobExecutions.add(handleJob(je, columnFormatter));
} else if (instanceId != null) {
for (JobExecution je : getJobExecutionForInstance(Long.valueOf(instanceId))) {