riw
riw

Reputation: 1

Running a list of steps in the spring batch by passing a start step name and end step name in the application arguments

Is there a way in the spring batch if we can run a set of processing (multiple steps) by passing the name of the start step and end step in the application arguments. Our requirement is that we have a spring batch with 11 steps where each of the step has different reader, processor and writer. to pass step3 and step8 as arguments, so the batch processes each step between step3 and step8.

knowing that the steps are defined in the context xml file.

Thank you for the help.

Upvotes: 0

Views: 1426

Answers (1)

Mahmoud Ben Hassine
Mahmoud Ben Hassine

Reputation: 31600

For this kind of specific requirements, you can use a JobExecutionDecider and make it decide which step to execute or not based on application arguments.

You can find more details and a code example in the reference documentation here: Programmatic Flow Decisions.

Upvotes: 0

Related Questions