Class FlowStep

  • All Implemented Interfaces:
    Step, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

    public class FlowStep
    extends AbstractStep
    A Step implementation that delegates to a Flow. Useful for logical grouping of steps, and especially for partitioning with multiple steps per execution. If the flow has steps then when the FlowStep executes, all steps including the parent FlowStep will have executions in the JobRepository (one for the parent and one each for the flow steps).
    Author:
    Dave Syer
    • Constructor Detail

      • FlowStep

        public FlowStep()
        Default constructor convenient for configuration purposes.
      • FlowStep

        public FlowStep​(Flow flow)
        Constructor for a FlowStep that sets the flow and of the step explicitly.
        Parameters:
        flow - the Flow instance to be associated with this step.
    • Method Detail

      • setFlow

        public void setFlow​(Flow flow)
        Public setter for the flow.
        Parameters:
        flow - the flow to set
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Ensure that the flow is set.
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Overrides:
        afterPropertiesSet in class AbstractStep
        Throws:
        java.lang.Exception
        See Also:
        AbstractStep.afterPropertiesSet()
      • doExecute

        protected void doExecute​(StepExecution stepExecution)
                          throws java.lang.Exception
        Delegate to the flow provided for the execution of the step.
        Specified by:
        doExecute in class AbstractStep
        Parameters:
        stepExecution - the current step context
        Throws:
        java.lang.Exception - checked exception thrown by implementation
        See Also:
        AbstractStep.doExecute(StepExecution)