Java Reference
In-Depth Information
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/batch
http://www.springframework.org/schema/batch/spring-batch-2.1.xsd">
<beans:import resource="../launch-context.xml"/>
<beans:bean id="loadStockFile"
class="com.apress.springbatch.chapter4.MessageTasklet">
<beans:property name="message"
value="The stock file has been loaded"/>
</beans:bean>
<beans:bean id="loadCustomerFile"
class="com.apress.springbatch.chapter4.MessageTasklet">
<beans:property name="message"
value="The customer file has been loaded" />
</beans:bean>
<beans:bean id="updateStart"
class="com.apress.springbatch.chapter4.MessageTasklet">
<beans:property name="message"
value="The stock file has been loaded" />
</beans:bean>
<beans:bean id="runBatchTasklet"
class="com.apress.springbatch.chapter4.MessageTasklet">
<beans:property name="message" value="The batch has been run" />
</beans:bean>
<flow id="preProcessingFlow">
<step id="loadFileStep" next="loadCustomerStep">
<tasklet ref="loadStockFile"/>
</step>
<step id="loadCustomerStep" next="updateStartStep">
<tasklet ref="loadCustomerFile"/>
</step>
<step id="updateStartStep">
<tasklet ref="updateStart"/>
</step>
</flow>
<job id="flowJob">
<flow parent="preProcessingFlow" id="step1" next="runBatch"/>
<step id="runBatch">
<tasklet ref="runBatchTasklet"/>
</step>
</job>
</beans:beans>
When you execute a flow as part of a job and look at the jobRepository , you see the steps from the
flow recorded as part of the job as if they were configured there in the first place. In the end, there is no
difference between using a flow and configuring the steps within the job itself from a JobRepository
perspective.
Search WWH ::




Custom Search