Creating a 'decider-step-loop' with spring-java-config -
Creating a 'decider-step-loop' with spring-java-config -
i'm trying port spring-batch job, defined in xml java-config based job. snippet of 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"> ... </step> <step id="stepreport" next="decision"> ... create study </step> <step id="steptimeout"> ... </step>
is there way create such loop 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 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 loopflowsample. how realize without xml?
how :
flowbuilder<flow> flowbuilder = new flowbuilder<flow>("flow1"); flow flow = flowbuilder .start(importpersonstep) .next(loopdecider) .on("continue") .to(importpersonstep) .from(loopdecider) .on("completed") .end() .build(); homecoming jobs.get("importuserjob") .incrementer(new runidincrementer()) .start(flow) .end() .build();
java spring spring-batch spring-java-config
Comments
Post a Comment