public Job create (Map<String,Object> aJobParams) {
    Assert.notNull(aJobParams,"request can't be null");
    MapObject jobParams = MapObject.of(aJobParams);
    String pipelineId = jobParams.getRequiredString(PIPELINE_ID);
    Pipeline pipeline = pipelineRepository.findOne(pipelineId);    
    Assert.notNull(pipeline,String.format("Unkown pipeline: %s", pipelineId));
    Assert.isNull(pipeline.getError(), pipeline.getError()!=null?String.format("%s: %s",pipelineId,pipeline.getError().getMessage()):null);

    validate (jobParams, pipeline);
    
    MapObject inputs = MapObject.of(jobParams.getMap(INPUTS,Collections.EMPTY_MAP));
    List<Accessor> webhooks = jobParams.getList(WEBHOOKS, MapObject.class, Collections.EMPTY_LIST);
    List<String> tags = (List<String>) aJobParams.get(TAGS);

    SimpleJob job = new SimpleJob();
    job.setId(UUIDGenerator.generate());
    job.setLabel(jobParams.getString(DSL.LABEL,pipeline.getLabel()));
    job.setPriority(jobParams.getInteger(DSL.PRIORITY, Prioritizable.DEFAULT_PRIORITY));
    job.setPipelineId(pipeline.getId());
    job.setStatus(JobStatus.CREATED);
    job.setCreateTime(new Date());
    job.setParentTaskExecutionId((String)aJobParams.get(DSL.PARENT_TASK_EXECUTION_ID));
    job.setWebhooks(webhooks!=null?webhooks:Collections.EMPTY_LIST);
    job.setInputs(inputs);
    log.debug("Job {} started",job.getId());
    jobRepository.create(job);
    
    MapContext context = new MapContext(jobParams.getMap(INPUTS,Collections.EMPTY_MAP));
    contextRepository.push(job.getId(),context);
    
    eventPublisher.publishEvent(PiperEvent.of(Events.JOB_STATUS,"jobId",job.getId(),"status",job.getStatus()));
    
    messageBroker.send(Queues.JOBS, job);

    return job;
  }
Starts a job instance.

@param aJobParams
         The Key-Value map representing the job
         parameters
@return Job
          The instance of the Job
src/main/java/com/creactiviti/piper/core/Coordinator.java