Dynamic steps #4662
-
Hi, We have a Job that is supposed to be run every day. It has multiple steps. Now we want to be able to deal with a production incident that miss an ore several executions.
How could we define this list dynamically ?
Thanks for your help, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi,
You can implement the logic of that decision in a decider. Here is a quick example: https://gist.github.com/fmbenhassine/3dd9ecf69bb1dafe6664aed5ab021099. The example starts with an initial step, but we added the ability to start a job with a decider in v5.1 (see #4411). Once the decision is made, then you can define the steps dynamically with something like this: How to create dynamic steps in Spring Batch. Let me know if this helps. |
Beta Was this translation helpful? Give feedback.
Hi,
You can implement the logic of that decision in a decider. Here is a quick example: https://gist.github.com/fmbenhassine/3dd9ecf69bb1dafe6664aed5ab021099. The example starts with an initial step, but we added the ability to start a job with a decider in v5.1 (see #4411). Once the decision is made, then you can define the steps dynamically with something like this: How to create dynamic steps in Spring Batch.
Let me know if this helps.