Expose spring batch workflow steps/tasks in advance from an api

37 Views Asked by At

For a spring batch workflow using java dsl, for example:

@Bean
public Job myWorkFlow() {
    return jobBuilders.get("myWorkFlow")
           .start(myFlowA.doStepA())
           .next(myFlowB.doStepB())
           .next(myFlowC.doStepC())
           .end()
           .build();

Does spring batch expose any api to see the workflow sequence of steps/tasklets, before the job is triggered. Once the job is launched, I can see the details in the BATCH_ tables and can also use jobExplorer.

I can wire in Jobs:

@Autowired
    private List<? extends Job> jobs;

The job can be instanceof FlowJob, from which I can get stepNames. However, the step names are not ordered. (I think it gets from underlying map)

Thanks.

1

There are 1 best solutions below

0
Mahmoud Ben Hassine On

Does spring batch expose any api to see the workflow sequence of steps/tasklets, before the job is triggered.

No, there is no such API provided by Spring Batch.