I am using spring batch where-in I have a use case to configure job with dynamic steps. The number of steps will depend based on the request sent by user. Currently I am using the tasklet methodology to process the step.
I do not want to process the data in chunks.
any way to workaround this, so i can configure job with dynamic steps.
please find the code snippet from JobConfiguration.
@Bean
public Job createBatchJob() {
return jobFactory.get(JOB_TYPE)
.preventRestart()
.start(step1())
.build();
}
@Bean
public Step step1() {
return stepFactory.get(STEP_TYPE)
.tasklet(batchTasklet).build();
}
How can I configure dynamic steps in above configuration?