-
Jul 10th, 2012, 10:21 AM
#1
Determine next step by code
Hi,
Is there a way to determine next step by code ?
Decision is not good to me, I want to take the name of the next step inside a configuration file depending some business logic.
Any way to do this ? It's seams not possible to modify the next value of a step definition
Regards,
-
Jul 13th, 2012, 05:52 PM
#2
Try using Spring EL (SpEL) expression language to manipulate an object graph at runtime. Assuming your running a newer version of the Spring framework. 3.0.5?
<batch:job id="Job1">
<batch:step id="#{ myBean.nextStep }" />
<batch:step id="#{ myBean.nextStep }" />
<batch:step id="#{ myBean.nextStep }" />
</batch:job>
Where myBean.nextStep queries the job for the next step and based on its current state the next step could change.
I've yet to try it but I think its worth a shot.
Jeff
-
Jul 16th, 2012, 03:47 PM
#3
Hi,
Thanks for the answer but I already tried this. SpEL is not allowed on the next parameter of a step.
I look at the code of Spring batch and it seems impossible to change this dynamically.
Seems that Spring Batch need to be able to know the whole job sequence at initialization
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules