Skip to content

Dynamic steps #4662

Closed Answered by fmbenhassine
pkernevez asked this question in Q&A
Sep 12, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi,

I would like to be able to define dynamically the steps, to decide before running the job that for this job we need to run

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pkernevez
Comment options

@fmbenhassine
Comment options

Answer selected by pkernevez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants