Announcement Announcement Module
Collapse
No announcement yet.
Determine next step by code Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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,

  • #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

    Comment


    • #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

      Comment

      Working...
      X