19

Difference between Batch Status and Exit Status in Spring Batch

1 Answer 1

24

From the Spring Batch documentation:

A BatchStatus object that indicates the status of the execution. While running, it's BatchStatus.STARTED, if it fails, it's BatchStatus.FAILED, and if it finishes successfully, it's BatchStatus.COMPLETED

The ExitStatus indicating the result of the run. It is most important because it contains an exit code that will be returned to the caller.

For more on the difference, see the section 5.3.2.1. Batch Status vs. Exit Status. You will find the explanation is quite good.

2
  • But I have some Steps that have a status of "STARTING" but they got messed up or something and have a exit_code of "EXECUTING" - what exactly causes this and I'm assuming its safe to say this is basically a failure? Jul 6, 2021 at 6:09
  • Updated Link to the documentation Nov 20, 2023 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.