File tree 1 file changed +6
-2
lines changed
spring-batch-core/src/main/java/org/springframework/batch/core/job/builder
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> {
70
70
71
71
private EndState stoppedState ;
72
72
73
+ private int stepCounter = 0 ;
74
+
75
+ private int flowCounter = 0 ;
76
+
73
77
private int decisionCounter = 0 ;
74
78
75
79
private int splitCounter = 0 ;
@@ -282,7 +286,7 @@ private State createState(Object input) {
282
286
if (input instanceof Step ) {
283
287
if (!states .containsKey (input )) {
284
288
Step step = (Step ) input ;
285
- states .put (input , new StepState (prefix + step . getName ( ), step ));
289
+ states .put (input , new StepState (prefix + " step" + ( stepCounter ++ ), step ));
286
290
}
287
291
result = states .get (input );
288
292
}
@@ -295,7 +299,7 @@ else if (input instanceof JobExecutionDecider) {
295
299
}
296
300
else if (input instanceof Flow ) {
297
301
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 ++ )));
299
303
}
300
304
result = states .get (input );
301
305
}
You can’t perform that action at this time.
0 commit comments