docs: public WSStartupRecoveryServiceImpl recoverLocalJobsInInflightStates() {
          String methodName = "recoverLocalJobsInInflightStates";
  
          try {
              List<JobExecutionEntity> executionInstances = persistenceManagerService.getJobExecutionsRunningLocalToServer(psu);
  
              //for each execution instance, update the batchstatus = exitstatus = FAILED, and timestamp of last update
              //TODO - This could be optimized if we do group update.
              for (JobExecutionEntity executionInstance : executionInstances) {
                  long executionId = executionInstance.getExecutionId();
                  long jobInstanceId = executionInstance.getInstanceId();
  
                  String newExitStatus = executionInstance.getExitStatus();
                  if (newExitStatus == null) {
                      newExitStatus = BatchStatus.FAILED.name();
                  }
  
                  if (logger.isLoggable(Level.FINE)) {
                      logger.fine(methodName + ": marking [job instance=" + jobInstanceId + ",old batchStatus=" + executionInstance.getBatchStatus().name()
                                  + " to new batchStatus=FAILED, new exitStatus=" + newExitStatus + "]");
                  }
  
                  // The world is a more orderly place with these two timestamp values showing the same!
                  Date markFailedTime = new Date();
                  try {
                      persistenceManagerService.updateJobExecutionAndInstanceFinalStatus(psu, executionId, BatchStatus.FAILED, newExitStatus, markFailedTime);
                  } catch (Exception updateExc) {
                      logger.log(Level.WARNING, "job.recovery.failed", new Object[] { jobInstanceId, updateExc });
                  }
  
                  // Perhaps we could do some consistency checking validation between the job-level markFailed and the step-level markFailed... but we don't bother for now.
                  for (StepExecution stepExecution : persistenceManagerService.getStepThreadExecutionsRunning(psu, executionId)) {
                      String newStepExitStatus = stepExecution.getExitStatus();
                      if (newStepExitStatus == null) {
                          newStepExitStatus = BatchStatus.FAILED.name();
                      }
                      logger.fine(methodName + ": marking [step execution=" + stepExecution.getStepExecutionId() + ",old batchStatus=" + stepExecution.getBatchStatus().name()
                                  + " to new batchStatus=FAILED, new step exitStatus=" + newStepExitStatus + "]");
                      persistenceManagerService.updateStepExecutionOnRecovery(psu, stepExecution.getStepExecutionId(), BatchStatus.FAILED, newStepExitStatus, markFailedTime);
                  }
              }
          } catch (Exception exception) {
              logger.log(Level.WARNING, "recovery.failed", exception);
          }
  
          return this;
      }