Class FlowStep
- java.lang.Object
- org.springframework.batch.core.step.AbstractStep
- org.springframework.batch.core.job.flow.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
AStep
implementation that delegates to aFlow
. Useful for logical grouping of steps, and especially for partitioning with multiple steps per execution. If the flow has steps then when theFlowStep
executes, all steps including the parentFlowStep
will have executions in theJobRepository
(one for the parent and one each for the flow steps).- Author:
- Dave Syer
Field Summary
Fields inherited from interface org.springframework.batch.core.Step
STEP_TYPE_KEY
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
Ensure that the flow is set.protected void
doExecute(StepExecution stepExecution)
Delegate to the flow provided for the execution of the step.void
setFlow(Flow flow)
Public setter for the flow.Methods inherited from class org.springframework.batch.core.step.AbstractStep
close, doExecutionRegistration, doExecutionRelease, execute, getCompositeListener, getJobRepository, getName, getStartLimit, isAllowStartIfComplete, open, registerStepExecutionListener, setAllowStartIfComplete, setBeanName, setJobRepository, setName, setStartLimit, setStepExecutionListeners, toString
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 interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classAbstractStep
- 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 classAbstractStep
- Parameters:
stepExecution
- the current step context- Throws:
java.lang.Exception
- checked exception thrown by implementation- See Also:
AbstractStep.doExecute(StepExecution)