code: @Override
      public List<StepExecution> getStepExecutionsTopLevelFromJobExecutionId(final long jobExecutionId) throws NoSuchJobExecutionException {
          final EntityManager em = getPsu().createEntityManager();
          try {
              List<StepExecution> exec = new TranRequest<List<StepExecution>>(em) {
                  @Override
                  public List<StepExecution> call() throws Exception {
                      TypedQuery<StepExecution> query = em.createNamedQuery(TopLevelStepExecutionEntity.GET_TOP_LEVEL_STEP_EXECUTIONS_BY_JOB_EXEC_SORT_BY_START_TIME_ASC,
                                                                            StepExecution.class);
                      query.setParameter("jobExecId", jobExecutionId);
                      List<StepExecution> result = query.getResultList();
                      if (result == null) {
                          result = new ArrayList<StepExecution>();
                      }
                      // If empty, try to get job execution to generate NoSuchJobExecutionException if unknown id
                      if (result.isEmpty()) {
                          getJobExecution(jobExecutionId);
                      }
                      return result;
                  }
              }.runInNewOrExistingGlobalTran();
              return exec;
          } finally {
              em.close();
          }
      }
docs: order by start time, ascending