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

Examples of org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache


      deployers.addAll(getDefaultDeployers());
      if (customPostDeployers!=null) {
        deployers.addAll(customPostDeployers);
      }

      deploymentCache = new DeploymentCache();
      deploymentCache.setDeployers(deployers);
    }
  }
View Full Code Here


        "'"+processInstance.getProcessInstanceId()+"'. " +
        "Please invoke the "+getClass().getSimpleName()+" with a root execution id.");
    }
    ProcessDefinitionImpl currentProcessDefinitionImpl = processInstance.getProcessDefinition();

    DeploymentCache deploymentCache = Context
      .getProcessEngineConfiguration()
      .getDeploymentCache();
    ProcessDefinitionEntity currentProcessDefinition;
    if (currentProcessDefinitionImpl instanceof ProcessDefinitionEntity) {
      currentProcessDefinition = (ProcessDefinitionEntity) currentProcessDefinitionImpl;
    } else {
      currentProcessDefinition = deploymentCache.findDeployedProcessDefinitionById(currentProcessDefinitionImpl.getId());
    }

    ProcessDefinitionEntity newProcessDefinition = deploymentCache
      .findDeployedProcessDefinitionByKeyAndVersion(currentProcessDefinition.getKey(), processDefinitionVersion);
   
    validateAndSwitchVersionOfExecution(commandContext, processInstance, newProcessDefinition);
   
    // switch the historic process instance to the new process definition version
View Full Code Here

      .findMessageStartEventSubscriptionByName(messageName);
    if(messageEventSubscription == null || messageEventSubscription.getConfiguration() == null) {
      return null;

    } else {
      DeploymentCache deploymentCache = Context
        .getProcessEngineConfiguration()
        .getDeploymentCache();

      String processDefinitionId = messageEventSubscription.getConfiguration();
      ProcessDefinitionEntity processDefinition = deploymentCache.findDeployedProcessDefinitionById(processDefinitionId);
      if (processDefinition == null) {
        LOGGER.log(Level.FINE, "Found event subscription with {0} but process definition {1} could not be found.",
            new Object[]{messageEventSubscription, processDefinitionId});
        return null;
View Full Code Here

      keyList.add(processDefinition.getKey());
    }

    CommandContext commandContext = Context.getCommandContext();
    ProcessDefinitionManager processDefinitionManager = commandContext.getProcessDefinitionManager();
    DeploymentCache deploymentCache = Context.getProcessEngineConfiguration().getDeploymentCache();
    DbEntityManager dbEntityManager = commandContext.getDbEntityManager();
    for (ProcessDefinitionEntity processDefinition : processDefinitions) {

      if (deployment.isNew()) {
        ProcessDefinitionEntity latestProcessDefinition = processDefinitionManager.findLatestProcessDefinitionByKey(processDefinition.getKey());

        processDefinition.setDeploymentId(deployment.getId());
        processDefinition.setVersion(getVersionForNewProcessDefinition(deployment, processDefinition, latestProcessDefinition));
        processDefinition.setId(getProcessDefinitionId(deployment, processDefinition));

        List<JobDeclaration<?>> declarations = jobDeclarations.get(processDefinition.getKey());
        updateJobDeclarations(declarations, processDefinition, deployment.isNew());
        adjustStartEventSubscriptions(processDefinition, latestProcessDefinition);

        dbEntityManager.insert(processDefinition);
        deploymentCache.addProcessDefinition(processDefinition);
        addAuthorizations(processDefinition);

      } else {

        String deploymentId = deployment.getId();
        processDefinition.setDeploymentId(deploymentId);
        ProcessDefinitionEntity persistedProcessDefinition = processDefinitionManager.findProcessDefinitionByDeploymentAndKey(deploymentId, processDefinition.getKey());
        processDefinition.setId(persistedProcessDefinition.getId());
        processDefinition.setVersion(persistedProcessDefinition.getVersion());
        processDefinition.setSuspensionState(persistedProcessDefinition.getSuspensionState());

        List<JobDeclaration<?>> declarations = jobDeclarations.get(processDefinition.getKey());
        updateJobDeclarations(declarations, processDefinition, deployment.isNew());

        deploymentCache.addProcessDefinition(processDefinition);
        addAuthorizations(processDefinition);

      }

      // Add to cache
View Full Code Here

      deployers.addAll(getDefaultDeployers());
      if (customPostDeployers!=null) {
        deployers.addAll(customPostDeployers);
      }

      deploymentCache = new DeploymentCache();
      deploymentCache.setDeployers(deployers);
    }
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache

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.