Package org.camunda.bpm.engine

Examples of org.camunda.bpm.engine.RepositoryService


      // get the application name
      String processApplicationName = processApplication.getName();

      // build the deployment
      final RepositoryService repositoryService = processEngine.getRepositoryService();

      final ProcessApplicationDeploymentBuilder deploymentBuilder = repositoryService.createDeployment(processApplication.getReference());

      // enable duplicate filtering
      deploymentBuilder.enableDuplicateFiltering(PropertyHelper.getBooleanProperty(processArchive.getProperties(), ProcessArchiveXml.PROP_IS_DEPLOY_CHANGED_ONLY, false));

      // enable resuming of previous versions:
View Full Code Here


        }
        else
          throw new ProcessEngineException("Could not find a process engine with name '" + processEngineName + "', no engines found. " +
                  "Make sure an engine configuration is present on the classpath");
      }
      RepositoryService repositoryService = processEngine.getRepositoryService();

      log("Starting to deploy " + files.size() + " files");
      for (File file: files) {
        String path = file.getAbsolutePath();
        log("Handling file " + path);
        try {
          FileInputStream inputStream = new FileInputStream(file);
          try {
            log("deploying bar "+path);
            repositoryService
                .createDeployment()
                .name(file.getName())
                .addZipInputStream(new ZipInputStream(inputStream))
                .deploy();
          } finally {
View Full Code Here

*/
public class HalProcessDefinitionResolver implements HalLinkResolver {

  public List<HalResource<?>> resolveLinks(String[] linkedIds, ProcessEngine processEngine) {

    RepositoryService repositoryService = processEngine.getRepositoryService();

    List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery()
      .processDefinitionIdIn(linkedIds)
      .listPage(0, linkedIds.length);

    List<HalResource<?>> resolved = new ArrayList<HalResource<?>>();
    for (ProcessDefinition procDef : processDefinitions) {
View Full Code Here

*/
public class HalCaseDefinitionResolver implements HalLinkResolver {

  public List<HalResource<?>> resolveLinks(String[] linkedIds, ProcessEngine processEngine) {

    RepositoryService repositoryService = processEngine.getRepositoryService();

    List<CaseDefinition> caseDefinitions = repositoryService.createCaseDefinitionQuery()
      .caseDefinitionIdIn(linkedIds)
      .listPage(0, linkedIds.length);

    List<HalResource<?>> resolved = new ArrayList<HalResource<?>>();
    for (CaseDefinition caseDefinition : caseDefinitions) {
View Full Code Here

    if (processDefinitionId != null && processDefinitionKey != null) {
      String message = "Only one of processDefinitionId or processDefinitionKey should be set to update the suspension state.";
      throw new InvalidRequestException(Status.BAD_REQUEST, message);
    }

    RepositoryService repositoryService = engine.getRepositoryService();

    Date delayedExecutionDate = null;
    if (executionDate != null && !executionDate.equals("")) {
      delayedExecutionDate = DateTimeUtil.parseDate(executionDate);
    }

    if (processDefinitionId != null) {
      // activate/suspend process definition by id
      if (getSuspended()) {
        repositoryService.suspendProcessDefinitionById(processDefinitionId, includeProcessInstances, delayedExecutionDate);
      } else {
        repositoryService.activateProcessDefinitionById(processDefinitionId, includeProcessInstances, delayedExecutionDate);
      }
    } else

    if (processDefinitionKey != null) {
      // activate/suspend process definition by key
      if (getSuspended()) {
        repositoryService.suspendProcessDefinitionByKey(processDefinitionKey, includeProcessInstances, delayedExecutionDate);
      } else {
        repositoryService.activateProcessDefinitionByKey(processDefinitionKey, includeProcessInstances, delayedExecutionDate);
      }
    } else {
      String message = "Either processDefinitionId or processDefinitionKey should be set to update the suspension state.";
      throw new InvalidRequestException(Status.BAD_REQUEST, message);
    }
View Full Code Here

    if(caseDefinitionKey == null) {
      throw new InvalidRequestException(Status.BAD_REQUEST, "Query parameter 'caseDefinitionKey' cannot be null");
    }

    ProcessEngine engine = getProcessEngine();
    RepositoryService repositoryService = engine.getRepositoryService();
    CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();

    query
      .caseDefinitionKey(caseDefinitionKey)
      .latestVersion();
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.RepositoryService

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.