gpt4 book ai didi

configuration - spring批处理配置中的步骤顺序和流程有什么区别?

转载 作者:行者123 更新时间:2023-12-04 07:34:16 24 4
gpt4 key购买 nike

我正在阅读 spring io 文档。

该文档显示了两个不同的示例

5.3.1 顺序流

<job id="job">
<step id="stepA" parent="s1" next="stepB" />
<step id="stepB" parent="s2" next="stepC"/>
<step id="stepC" parent="s3" />
</job>



5.3.6 外化流程定义和作业之间的依赖关系
<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>

使用某些步骤和某些具有某些步骤的流程有什么区别?

我很困惑。请帮我。

最佳答案

第二种形式允许您重复使用 flow1在另一份工作中。

<job id="job2">
<flow id="job2.flow1" parent="flow1" next="job2.step3"/>
<step id="job2.step3" parent="s3"/>
</job>

来自官方文档:

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

关于configuration - spring批处理配置中的步骤顺序和流程有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27916091/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com