code: @Override
      public ExitStatus afterStep(StepExecution stepExecution) {
          ExitStatus status = stepExecution.getExitStatus();
          List<String> errors = getErrors();
          if (errors.size() > 0) {
              status = status.and(ExitStatus.FAILED);
              for (String error : errors) {
                  status = status.addExitDescription(error);
              }
  
              resetContextState();
              stepExecution.upgradeStatus(BatchStatus.FAILED);
              stepExecution.setTerminateOnly();
              log.error("manifest verification finished: step_execution_id={} " +
                        "job_execution_id={} restore_id={} exit_status=\"{}\"",
                        stepExecution.getId(),
                        stepExecution.getJobExecutionId(),
                        restorationId,
                        status);
  
          } else {
              log.info("manifest verification finished:step_execution_id={} " +
                       "job_execution_id={} restore_id={} exit_status=\"{}\"",
                       stepExecution.getId(),
                       stepExecution.getJobExecutionId(),
                       restorationId,
                       status);
  
              status = status.and(ExitStatus.COMPLETED);
          }
  
          return status;
      }
docs: /*
  (non-Javadoc)
  
  @see org.springframework.batch.core.StepExecutionListener#afterStep(org.
  springframework.batch.core.StepExecution)