0
votes

I am using Spring Batch 3.0.3. I have a job named JBABC, it inlcudes 3 steps. Is it possible, can i run user defined steps while invoking JBABC. Some roles might need to start/restart job from ABC1, whereas some other roles need a start/restart from ABC2 and other group might need start/restart from ABC3. So basically i am looking for to run a job based on custom/user defined step parameter.

<job id="JBABC" xmlns="http://www.springframework.org/schema/batch">
    <step id="ABC1" next="ABC2"  >
        <tasklet ref="abc1Tasklet"></tasklet>
    </step>
    <step id="ABC2" next ="ABC3">
        <tasklet ref="abc2Tasklet"></tasklet>
    </step>
    <step id="ABC3">
        <tasklet ref="abc3Tasklet"></tasklet>
    </step>
</job>
1

1 Answers

0
votes

Have a look at http://docs.spring.io/spring-batch/trunk/reference/html/configureStep.html Chapter 5.3.2.

You can implement a first step, whicht returns a specific state depending on a parameter. With the ""-tag, you will be able to define which step should be executed as next.

Depending on how many options you have, you could also define different jobs and use a specific launcher to start the one you have to.