Package org.camunda.bpm.engine.impl.persistence.entity

Examples of org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionEntity


  }

  protected void createJobDefinition(ProcessDefinition processDefinition, JobDeclaration<?> jobDeclaration) {
    final JobDefinitionManager jobDefinitionManager = Context.getCommandContext().getJobDefinitionManager();

    JobDefinitionEntity jobDefinitionEntity = new JobDefinitionEntity(jobDeclaration);
    jobDefinitionEntity.setProcessDefinitionId(processDefinition.getId());
    jobDefinitionEntity.setProcessDefinitionKey(processDefinition.getKey());
    jobDefinitionManager.insert(jobDefinitionEntity);
    jobDeclaration.setJobDefinitionId(jobDefinitionEntity.getId());
  }
View Full Code Here


    // set job definition id
    job.setJobDefinitionId(jobDefinitionId);

    if(jobDefinitionId != null) {

      JobDefinitionEntity jobDefinition = Context.getCommandContext()
        .getJobDefinitionManager()
        .findById(jobDefinitionId);

      if(jobDefinition != null) {
        // if job definition is suspended while creating a job instance,
        // suspend the job instance right away:
        job.setSuspensionState(jobDefinition.getSuspensionState());
        job.setProcessDefinitionKey(jobDefinition.getProcessDefinitionKey());
        job.setProcessDefinitionId(jobDefinition.getProcessDefinitionId());
      }

    }

    job.setJobHandlerType(jobHandlerType);
View Full Code Here

  }

  protected void createJobDefinition(ProcessDefinition processDefinition, JobDeclaration<?> jobDeclaration) {
    final JobDefinitionManager jobDefinitionManager = Context.getCommandContext().getJobDefinitionManager();

    JobDefinitionEntity jobDefinitionEntity = new JobDefinitionEntity(jobDeclaration);
    jobDefinitionEntity.setProcessDefinitionId(processDefinition.getId());
    jobDefinitionEntity.setProcessDefinitionKey(processDefinition.getKey());
    jobDefinitionManager.insert(jobDefinitionEntity);
    jobDeclaration.setJobDefinitionId(jobDefinitionEntity.getId());
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionEntity

Copyright © 2018 www.massapicom. 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.