File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
spring-batch-core/src/main/java/org/springframework/batch/core/job/builder Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ public class FlowBuilder<Q> {
7070
7171 private EndState stoppedState ;
7272
73+ private int stepCounter = 0 ;
74+
75+ private int flowCounter = 0 ;
76+
7377 private int decisionCounter = 0 ;
7478
7579 private int splitCounter = 0 ;
@@ -282,7 +286,7 @@ private State createState(Object input) {
282286 if (input instanceof Step ) {
283287 if (!states .containsKey (input )) {
284288 Step step = (Step ) input ;
285- states .put (input , new StepState (prefix + step . getName ( ), step ));
289+ states .put (input , new StepState (prefix + " step" + ( stepCounter ++ ), step ));
286290 }
287291 result = states .get (input );
288292 }
@@ -295,7 +299,7 @@ else if (input instanceof JobExecutionDecider) {
295299 }
296300 else if (input instanceof Flow ) {
297301 if (!states .containsKey (input )) {
298- states .put (input , new FlowState ((Flow ) input , prefix + (( Flow ) input ). getName ( )));
302+ states .put (input , new FlowState ((Flow ) input , prefix + "flow" + ( flowCounter ++ )));
299303 }
300304 result = states .get (input );
301305 }
You can’t perform that action at this time.
0 commit comments