From 33f87e992f79f9760295b943495c20aeff2b8ebb Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Mon, 21 Apr 2014 19:21:49 -0500 Subject: [PATCH] Fixed merge issue --- .../batch/core/job/flow/support/SimpleFlow.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java index cb4ccb6bd..71e728acd 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java @@ -237,8 +237,9 @@ public class SimpleFlow implements Flow, InitializingBean { if(stepExecution != null) { Boolean reRun = (Boolean) stepExecution.getExecutionContext().get("batch.restart"); + Boolean executed = (Boolean) stepExecution.getExecutionContext().get("batch.executed"); - if(reRun != null && reRun && status == FlowExecutionStatus.STOPPED && stateNameEndsWithStepName(state, stepExecution)) { + if((executed == null || !executed) && reRun != null && reRun && status == FlowExecutionStatus.STOPPED && !state.getName().endsWith(stepExecution.getStepName()) ) { continued = true; } }