diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java index 603db6866..64b1a8033 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java @@ -184,7 +184,8 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw stepExecution.setStatus(BatchStatus.STARTED); getJobRepository().update(stepExecution); - ExitStatus exitStatus = ExitStatus.FAILED; + // Start with a default value that will be trumped by anything + ExitStatus exitStatus = ExitStatus.EXECUTING; Exception commitException = null; StepSynchronizationManager.register(stepExecution);