I'm trying to port a spring-batch job, which is defined in xml to a java-config based job. This is a snippet of my job-configuration-file:
<decision id="decision" decider="someDecider">
<next on="continue" to="stepCont" />
<next on="timeout" to="stepTimeout" />
<end on="COMPLETED" />
</decision>
<step id="stepCont" next="stepReport">
... do something
</step>
<step id="stepReport" next="decision">
... create report
</step>
<step id="stepTimeout">
...
</step>
Is there a way to create such a loop with spring-java-config?
I started:
.get("myJob")
.start(someStepBefore())
.next(someDecider).on("timeout").to(stepTimeout())
.from(someDecider).on("continue").to(stepCont())
.from(someDecider).on("COMPLETED").end().build()
.build();
It must be like:
.get("myJob")
.start(someStepBefore())
.next(someDecider).on("timeout").to(stepTimeout())
.from(someDecider).on("continue").to(stepCont()).next(someDecider)...
.from(someDecider).on("COMPLETED").end().build()
.build();
My job is like the loopFlowSample. How could I realize it without xml?