spring-projects / spring-projects/spring-batch
Use ExitStatus as parameter for Flowbuilder.on() method
Open
Beginner friendly
Nobody has claimed this yet.
status: waiting-for-triage
type: feature
- Dominant language
- Java
- Stars
- 3k
- Forks
- 2.5k
- Avg merge
- 6d 53m
- Merged PRs (30d)
- 3
Description
Hello,
Expected Behavior
In this code
new JobBuilder("MY_JOB_NAME", jobRepository)
...
.on(ExitStatus.COMPLETED.getExitCode()).to(myNextStep)
...
.build();
add the possibility to use directly a ExitStatus type, to have:
new JobBuilder("MY_JOB_NAME", jobRepository)
...
.on(ExitStatus.COMPLETED).to(myNextStep)
...
.build();
Context
This is just a simply to use this Spring Batch class in a way that is consistent with the class Flowbuilder.
Thank you.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the FlowBuilder.on() API and inspect how it currently accepts an exit-code string and how ExitStatus is represented. Add support for the ExitStatus form shown in the issue, then verify that both invocation styles build the expected flow and that the existing string form remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100