Package org.camunda.bpm.engine.impl

Examples of org.camunda.bpm.engine.impl.ProcessDefinitionQueryImpl


  protected void removeAllProcessDefinitionsByDeploymentId(String deploymentId) {
    // remove all process definitions for a specific deployment
    CommandContext commandContext = Context.getCommandContext();

    List<ProcessDefinition> allDefinitionsForDeployment = new ProcessDefinitionQueryImpl(commandContext)
        .deploymentId(deploymentId)
        .list();

    for (ProcessDefinition processDefinition : allDefinitionsForDeployment) {
      try {
View Full Code Here


    parameters.put("processDefinitionKey", processDefinitionKey);
    return (ProcessDefinitionEntity) getDbEntityManager().selectOne("selectProcessDefinitionByDeploymentAndKey", parameters);
  }

  public ProcessDefinition findProcessDefinitionByKeyAndVersion(String processDefinitionKey, Integer processDefinitionVersion) {
    ProcessDefinitionQueryImpl processDefinitionQuery = new ProcessDefinitionQueryImpl()
      .processDefinitionKey(processDefinitionKey)
      .processDefinitionVersion(processDefinitionVersion);
    List<ProcessDefinition> results = findProcessDefinitionsByQueryCriteria(processDefinitionQuery, null);
    if (results.size() == 1) {
      return results.get(0);
View Full Code Here

    }
    return null;
  }

  public List<ProcessDefinition> findProcessDefinitionsByKey(String processDefinitionKey) {
    ProcessDefinitionQueryImpl processDefinitionQuery = new ProcessDefinitionQueryImpl()
      .processDefinitionKey(processDefinitionKey);
    return  findProcessDefinitionsByQueryCriteria(processDefinitionQuery, null);
  }
View Full Code Here

      .processDefinitionKey(processDefinitionKey);
    return  findProcessDefinitionsByQueryCriteria(processDefinitionQuery, null);
  }

  public List<ProcessDefinition> findProcessDefinitionsStartableByUser(String user) {
    return   new ProcessDefinitionQueryImpl().startableByUser(user).list();
  }
View Full Code Here

  @SuppressWarnings({ "unchecked", "rawtypes" })
  protected List<ProcessDefinitionEntity> getDeployedProcesses(DeploymentEntity deployment) {
    List<ProcessDefinitionEntity> deployedProcessDefinitions = deployment.getDeployedArtifacts(ProcessDefinitionEntity.class);
    if(deployedProcessDefinitions == null) {
      // existing deployment
      deployedProcessDefinitions = (List) new ProcessDefinitionQueryImpl(Context.getCommandContext())
        .deploymentId(deployment.getId())
        .list();
    }

    return deployedProcessDefinitions;
View Full Code Here

  }

  protected void resumePreviousVersions(CommandContext commandContext, Set<String> processDefinitionKeys, Set<String> deploymentsToRegister) {
    for (String processDefinitionKey : processDefinitionKeys) {
      // query for process definitions with that key:
      List<ProcessDefinition> previousVersionDefinition = new ProcessDefinitionQueryImpl(commandContext)
        .processDefinitionKey(processDefinitionKey)
        .list();

      // add their deployment IDs to the set of deployments to register
      for (ProcessDefinition processDefinition : previousVersionDefinition) {
View Full Code Here

    if (entities == null) {
      String deploymentId = deployment.getId();

      // query db
      return new ProcessDefinitionQueryImpl(commandContext)
        .deploymentId(deploymentId)
        .list();
    }

    return new ArrayList<ProcessDefinition>(entities);
View Full Code Here

  public DeploymentQueryImpl createDeploymentQuery() {
    return new DeploymentQueryImpl();
  }

  public ProcessDefinitionQueryImpl createProcessDefinitionQuery() {
    return new ProcessDefinitionQueryImpl();
  }
View Full Code Here

  public DeploymentQueryImpl createDeploymentQuery() {
    return new DeploymentQueryImpl();
  }

  public ProcessDefinitionQueryImpl createProcessDefinitionQuery() {
    return new ProcessDefinitionQueryImpl();
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.ProcessDefinitionQueryImpl

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.