public Job resume (String aJobId) {
    log.debug("Resuming job {}", aJobId);
    Job job = jobRepository.getById (aJobId);
    Assert.notNull(job,String.format("Unknown job %s",aJobId));
    Assert.isTrue(job.getParentTaskExecutionId() == null,"Can't resume a subflow");
    Assert.isTrue(isRestartable(job), "can't restart job " + aJobId + " as it is " + job.getStatus());
    SimpleJob mjob = new SimpleJob (job);
    mjob.setStatus(JobStatus.STARTED);
    jobRepository.merge(mjob);
    jobExecutor.execute(mjob);
    return mjob;
  }
Resume a stopped or failed job.

@param aJobId
         The id of the job to resume.
@return The resumed job
src/main/java/com/creactiviti/piper/core/Coordinator.java