RESOLVED - issue BATCH-454: broken step's isAllowedStartIfComplete property
http://jira.springframework.org/browse/BATCH-454 job does not pass the restored context to step if the exit status of last execution is FINISHED
This commit is contained in:
@@ -108,7 +108,8 @@ public class SimpleJob extends AbstractJob {
|
||||
|
||||
StepExecution lastStepExecution = jobRepository.getLastStepExecution(jobInstance, step);
|
||||
|
||||
boolean isRestart = jobRepository.getStepExecutionCount(jobInstance, step) > 0 ? true : false;
|
||||
boolean isRestart = (jobRepository.getStepExecutionCount(jobInstance, step) > 0
|
||||
&& !lastStepExecution.getExitStatus().equals(ExitStatus.FINISHED)) ? true : false;
|
||||
|
||||
if (isRestart && lastStepExecution != null) {
|
||||
currentStepExecution.setExecutionContext(lastStepExecution.getExecutionContext());
|
||||
|
||||
Reference in New Issue
Block a user