複数のフローを持つジョブを実行しようとすると、config.xmlがロードされているときに次のエラーが発生します。第1のフローは識別され、第2のフローは識別されなかった。複数のフローがSpringバッチジョブで構成されている場合のエラー
違反リソース:クラスパスリソース[spring/batch/jobs/myAppConfig.xml];ネストされた例外はorg.springframework.beans.factory.parsing.BeanDefinitionParsingExceptionです:設定問題:要素は[job1Flow2]
到達不能であるすべてのフローは、一連のステップを持って、私はステップの中に様々な組み合わせの様々な仕事を持っています必要です。だから私はフローをフローとして実装し、フローを再利用して、自分のジョブに必要なすべてのステップがあることを考えました。
私のconfigファイル:
<batch:job id="job1" parent="parentJob">
<batch:flow parent="MyFlow1" id="job1Flow1"/>
<batch:flow parent="MyFlow2" id="job1Flow2"/>
</batch:job>
<batch:flow id="MyFlow1">
<batch:step id="step1" next="step2" parent="parentStep">
<batch:tasklet ref="bean1"/>
</batch:step>
<batch:step id="step2" parent="parentStep">
<batch:tasklet ref="bean2"/>
</batch:step>
</batch:flow>
<batch:flow id="MyFlow2">
<batch:step id="step3" next="step4" parent="parentStep">
<batch:tasklet ref="bean3"/>
</batch:step>
<batch:step id="step4" parent="parentStep">
<batch:tasklet ref="bean4"/>
</batch:step>
</batch:flow>
私は、第二の流れをコメントし、それが正常に実行されたジョブを実行した場合。流れや他の方法で私の仕事をやり遂げる方法があるかどうか教えてください。