简体   繁体   中英

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM