I was reading spring io document.
the document shows two different examples
5.3.1 Sequential Flow
<job id="job">
<step id="stepA" parent="s1" next="stepB" />
<step id="stepB" parent="s2" next="stepC"/>
<step id="stepC" parent="s3" />
</job>
and
5.3.6 Externalizing Flow Definitions and Dependencies Between Jobs
<job id="job">
<flow id="job1.flow1" parent="flow1" next="step3"/>
<step id="step3" parent="s3"/>
</job>
<flow id="flow1">
<step id="step1" parent="s1" next="step2"/>
<step id="step2" parent="s2"/>
</flow>
what's the difference between using some steps and some flows having some steps?
I'm in confusion. Please help me.
The second form allow you to reuse flow1
in another job.
<job id="job2">
<flow id="job2.flow1" parent="flow1" next="job2.step3"/>
<step id="job2.step3" parent="s3"/>
</job>
From official doc:
The effect of defining an external flow like this is simply to insert the steps from the external flow into the job as if they had been declared inline. In this way many jobs can refer to the same template flow and compose such templates into different logical flows. This is also a good way to separate the integration testing of the individual flows
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With