-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Milestone
Description
Discussed in #4359
Originally posted by acktsap April 12, 2023
In xml based job configuration, we can set decider first like this.
<job id="decisionJob1" >
<decision id="decider1" decider="stepFlowDecider">
<end on="EXIT" exit-code="COMPLETED"/>
<next on="*" to="job1Step1" />
</decision>
<step id="job1Step1">
<tasklet ref="createFileTasklet"/>
</step>
</job>
But when using code based job configuration, no way to start with decider. JobBuilder
only provides start methods taking Step
, Flow
only.
Lines 53 to 78 in 972951a
/** | |
* Create a new job builder that will execute a step or sequence of steps. | |
* @param step a step to execute | |
* @return a {@link SimpleJobBuilder} | |
*/ | |
public SimpleJobBuilder start(Step step) { | |
return new SimpleJobBuilder(this).start(step); | |
} | |
/** | |
* Create a new job builder that will execute a flow. | |
* @param flow a flow to execute | |
* @return a {@link SimpleJobBuilder} | |
*/ | |
public JobFlowBuilder start(Flow flow) { | |
return new FlowJobBuilder(this).start(flow); | |
} | |
/** | |
* Create a new job builder that will execute a step or sequence of steps. | |
* @param step a step to execute | |
* @return a {@link SimpleJobBuilder} | |
*/ | |
public JobFlowBuilder flow(Step step) { | |
return new FlowJobBuilder(this).start(step); | |
} |
It there any way to set decider first on code based job configuration?
References:
seonWKim