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:
robokaso
2008-03-14 10:18:23 +00:00
parent 8c281d1021
commit fe79a4dbe0
2 changed files with 104 additions and 54 deletions

View File

@@ -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());