Description
Bug description
The exception is thrown in all cases where the flow follow a path 'from().on().to()', for anything else it works
Environment
Java 17, Srping-boot 3.0.5, Spring-batch 5
Steps to reproduce
- Create a Job, that controls the flow based on step's ExitStatus code,
return new JobBuilder("prepareFlowersJob", jobRepository)
.start(selectFlowersStep())
.on(FlowerSelectionStepExecutionListener.NO_TRIM_REQUIRED).to(arrangeFlowersStep())
.from(selectFlowersStep()).on(FlowerSelectionStepExecutionListener.TRIM_REQUIRED).to(removeThornsStep())
.from(removeThornsStep()).next(arrangeFlowersStep())
.end()
.build();
I have added the photos of the 'stateTransitions' list from SimpleFlow.java in debug mode which show that the there is no transition from step0 (selectFlowerStep()) when 'Trim Required',
in fact it shows the transition from step2 when 'Trim Required', it appears that 'from()' doesn't create the transition from 'selectFlowersStep()' but instead creates a new Step altogether.
Hopefully the images will be uploaded properly, doesn't look like.. If photos don't upload please have a look at this Issue, I have added there earlier today.
Here is the [link to my project ](https://github.com/AJ198081/spring-batch/blob/master/src/main/java/dev/aj/springbatch/config/jobs/BatchJob.java
Expected behavior
The job flow should execute for all control paths
Minimal Complete Reproducible example
The code throws the next State not found - FlowExecutionException