Skip to content

Job operator restart failed step issue #4647

@vatsla20

Description

@vatsla20

Bug description
I have a spring batch job with eg : 4 steps, the second steps fails and the flow is such that I need to update details so it goes on to the 3rd and 4th steps marks them as complete.
In the end of the job I update the job execution with status and exit status as failed and restart the job.
Step execution :

  1. Status - completed , exitstatus - completed
  2. Status - failed , exitstatus - failed
  3. Status - completed , exitstatus - completed
  4. Status - completed , exitstatus - completed
    Job execution status failed and exit status failed

On restart non of the steps are executed again and the job ends successfully.
I want to restart the job from the failed step.

Now if I try to fail the last 3 steps
Step execution :

  1. Status - completed , exitstatus - completed
  2. Status - failed , exitstatus - failed
  3. Status - failed , exitstatus - failed
  4. Status - failed , exitstatus - failed
    Job execution status failed and exit status failed

Here only the step 4 is executed on the restart, it's taking only the last failed step.
Environment
Please provide as many details as possible: Spring batch version - 5.1.2
Java version 17

Steps to reproduce
Given above

Expected behavior
How can I make the job restart from the second step which is the actual failed step

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions