Skip to content

[Question] Any way to set decider first? #4359

Closed Answered by fmbenhassine
acktsap asked this question in Q&A
Discussion options

You must be logged in to vote

I agree with @acktsap , if it is possible to start a job with a decision in XML, it should be possible to do it in Java as well using the JobBuilder API. The JobFlowBuilder already provides a constructor to create a flow with a decider, so this feature could be implemented by adding the following two methods:

public class JobBuilder extends JobBuilderHelper<JobBuilder> {

++	public JobFlowBuilder start(JobExecutionDecider decider) {
++		return new FlowJobBuilder(this).start(decider);
++	}

}

public class FlowJobBuilder extends JobBuilderHelper<FlowJobBuilder> {

++	public JobFlowBuilder start(JobExecutionDecider decider) {
++		return new JobFlowBuilder(this, decider);
++	}

}

With that i…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@acktsap
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by fmbenhassine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #4350 on April 25, 2023 20:12.