code: @Override
      public ExitStatus afterStep(StepExecution stepExecution) {
          // compare counts (which should not include SNAPSHOT_PROPS_FILENAME
          // on the snapshot repo side since it does not get written to the
          // manifest.
          long snapshotItemCount = getItemsRead();
          if (snapshotItemCount == this.manifestSet.size()) {
              log.debug("snapshot repo count matches manifest count: "
                        + "step_execution_id={} job_execution_id={} snapshot_name={}",
                        stepExecution.getId(),
                        stepExecution.getJobExecutionId(),
                        this.snapshotName);
          } else {
              addError("snapshot ("
                       + snapshotName + ") content item count (" + snapshotItemCount
                       + ") does not match manifest count (" + manifestSet.size() + ")");
          }
  
          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);
              }
  
              log.error("snapshot repo verification finished: step_execution_id={} "
                        + "job_execution_id={} snapshot_name={} status=\"{}\"",
                        stepExecution.getId(),
                        stepExecution.getJobExecutionId(),
                        snapshotName,
                        status);
  
              failExecution();
  
              resetContextState();
  
          } else {
              status = status.and(ExitStatus.COMPLETED);
          }
  
          return status;
      }
docs: /*
  (non-Javadoc)
  
  @see org.springframework.batch.core.StepExecutionListener#afterStep(org.
  springframework.batch.core.StepExecution)