Class FlowJobBuilder

java.lang.Object
org.springframework.batch.core.job.builder.JobBuilderHelper<FlowJobBuilder>
org.springframework.batch.core.job.builder.FlowJobBuilder

public class FlowJobBuilder extends JobBuilderHelper<FlowJobBuilder>
A job builder for FlowJob instances. A flow job delegates processing to a nested flow composed of steps and conditional transitions between steps.
Since:
2.2
Author:
Dave Syer, Mahmoud Ben Hassine
  • Constructor Details

    • FlowJobBuilder

      public FlowJobBuilder(JobBuilderHelper<?> parent)
      Create a new builder initialized with any properties in the parent. The parent is copied, so it can be re-used.
      Parameters:
      parent - a parent helper containing common job properties
  • Method Details

    • start

      public JobFlowBuilder start(Flow flow)
      Start a job with this flow, but expect to transition from there to other flows or steps.
      Parameters:
      flow - the flow to start with
      Returns:
      a builder to enable fluent chaining
    • start

      public JobFlowBuilder start(Step step)
      Start a job with this step, but expect to transition from there to other flows or steps.
      Parameters:
      step - the step to start with
      Returns:
      a builder to enable fluent chaining
    • start

      public JobFlowBuilder start(JobExecutionDecider decider)
      Start a job with this decider, but expect to transition from there to other flows or steps.
      Parameters:
      decider - the decider to start with
      Returns:
      a builder to enable fluent chaining
      Since:
      5.1
    • flow

      protected FlowJobBuilder flow(Flow flow)
      Provide a single flow to execute as the job.
      Parameters:
      flow - the flow to execute
      Returns:
      this for fluent chaining
    • build

      public Job build()
      Build a job that executes the flow provided, normally composed of other steps.
      Returns:
      a flow job