Skip to content

Commit

Permalink
Do not call getName on step/flow - they may be Job/Step scoped proxies
Browse files Browse the repository at this point in the history
Resolves #857
  • Loading branch information
ArtyomGabeev authored and fmbenhassine committed Oct 27, 2020
1 parent fae6c5b commit 0c50079
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -70,6 +70,10 @@ public class FlowBuilder<Q> {

private EndState stoppedState;

private int stepCounter = 0;

private int flowCounter = 0;

private int decisionCounter = 0;

private int splitCounter = 0;
Expand Down Expand Up @@ -282,7 +286,7 @@ private State createState(Object input) {
if (input instanceof Step) {
if (!states.containsKey(input)) {
Step step = (Step) input;
states.put(input, new StepState(prefix + step.getName(), step));
states.put(input, new StepState(prefix + "step" + (stepCounter++), step));
}
result = states.get(input);
}
Expand All @@ -295,7 +299,7 @@ else if (input instanceof JobExecutionDecider) {
}
else if (input instanceof Flow) {
if (!states.containsKey(input)) {
states.put(input, new FlowState((Flow) input, prefix + ((Flow) input).getName()));
states.put(input, new FlowState((Flow) input, prefix + "flow" + (flowCounter++)));
}
result = states.get(input);
}
Expand Down

0 comments on commit 0c50079

Please sign in to comment.