在我的Spring Batch应用程序中,我配置了以下作业流程:
@Bean(name = REPORT_JOB_NAME)
public Job reportJob() {
//@formatter:off
return jobBuilderFactory
.get(REPORT_JOB_NAME)
.flow(createRequestStep())
.on("*").to(retriveDataStep())
.on("*").to(notifyAdminStep())
.end().build();
//@formatter:on
}
@Bean
public Step createRequestStep() {
return stepBuilderFactory.get("createRequest").tasklet(new CreateRequestTasklet(reportService)).build();
}
@Bean
public Step retriveDataStep() {
return stepBuilderFactory.get("retriveData").tasklet(new RetriveDataTasklet()).build();
}
我需要将requestId
中创建的createRequestStep
值传递给retriveDataStep
。
如何实施?