Examples of JsrStepExecution


Examples of org.springframework.batch.core.jsr.JsrStepExecution

    @Override
    public void execute(StepExecution stepExecution) throws JobInterruptedException {
      stepExecution.setStatus(BatchStatus.COMPLETED);
      try {
        stepExecution.setExitStatus(new ExitStatus(decider.decide(new javax.batch.runtime.StepExecution [] {new JsrStepExecution(stepExecution)})));
      } catch (Exception e) {
        throw new RuntimeException(e);
      }

      jobRepository.update(stepExecution);
View Full Code Here

Examples of org.springframework.batch.core.jsr.JsrStepExecution

    if(executionContext.containsKey("batch.lastSteps")) {
      List<String> stepNames = (List<String>) executionContext.get("batch.lastSteps");

      for (String stepName : stepNames) {
        StepExecution curStepExecution = getJobRepository().getLastStepExecution(stepExecution.getJobExecution().getJobInstance(), stepName);
        stepExecutions.add(new JsrStepExecution(curStepExecution));
      }
    } else {
      Collection<StepExecution> currentRunStepExecutions = stepExecution.getJobExecution().getStepExecutions();

      StepExecution lastExecution = null;

      if(stepExecutions != null) {
        for (StepExecution curStepExecution : currentRunStepExecutions) {
          if(lastExecution == null || (curStepExecution.getEndTime() != null && curStepExecution.getEndTime().after(lastExecution.getEndTime()))) {
            lastExecution = curStepExecution;
          }
        }

        stepExecutions.add(new JsrStepExecution(lastExecution));
      }
    }

    try {
      ExitStatus exitStatus = new ExitStatus(decider.decide(stepExecutions.toArray(new javax.batch.runtime.StepExecution[0])));
View Full Code Here

Examples of org.springframework.batch.core.jsr.JsrStepExecution

    List<StepExecution> batchExecutions = new ArrayList<StepExecution>();

    if(executions != null) {
      for (org.springframework.batch.core.StepExecution stepExecution : executions) {
        if(!stepExecution.getStepName().contains(":partition")) {
          batchExecutions.add(new JsrStepExecution(jobExplorer.getStepExecution(executionId, stepExecution.getId())));
        }
      }
    }

    return batchExecutions;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.