Package org.camunda.bpm.application

Examples of org.camunda.bpm.application.ProcessApplicationRegistration


    assertEquals(2, processDefinitionsModel2.size());
    assertEquals(1, processDefinitionsModel2.get(0).getVersion());
    assertEquals(2, processDefinitionsModel2.get(1).getVersion());

    // old deployment was resumed
    ProcessApplicationRegistration registration = deployment2.getProcessApplicationRegistration();
    Set<String> deploymentIds = registration.getDeploymentIds();
    assertEquals(2, deploymentIds.size());

    BpmnModelInstance anotherChangedModel2 = Bpmn.createExecutableProcess("process2").startEvent().endEvent().done();

    // testing with a third deployment to ensure the change check is not only performed against
    // the last version of the deployment
    ProcessApplicationDeployment deployment3 = repositoryService.createDeployment(processApplication.getReference())
        .enableDuplicateFiltering(true)
        .resumePreviousVersions()
        .addModelInstance("process1.bpmn20.xml", model1)
        .addModelInstance("process2.bpmn20.xml", anotherChangedModel2)
        .name("deployment")
        .deploy();

    // there should still be one version of process 1
    assertEquals(1, repositoryService.createProcessDefinitionQuery().processDefinitionKey("process1").count());

    // there should be three versions of process 2
    assertEquals(3, repositoryService.createProcessDefinitionQuery().processDefinitionKey("process2").count());

    // old deployments are resumed
    registration = deployment3.getProcessApplicationRegistration();
    deploymentIds = registration.getDeploymentIds();
    assertEquals(3, deploymentIds.size());

    repositoryService.deleteDeployment(deployment1.getId(), true);
    repositoryService.deleteDeployment(deployment2.getId(), true);
    repositoryService.deleteDeployment(deployment3.getId(), true);
View Full Code Here


      .resumePreviousVersions()
      .addModelInstance("process1.bpmn20.xml", model1)
      .addModelInstance("process2.bpmn20.xml", model2)
      .deploy();

    ProcessApplicationRegistration registration = deployment2.getProcessApplicationRegistration();
    assertEquals(2, registration.getDeploymentIds().size());

    repositoryService.deleteDeployment(deployment1.getId(), true);
    repositoryService.deleteDeployment(deployment2.getId(), true);
  }
View Full Code Here

    // now there are 2 process definitions deployed
    assertEquals(1, processDefinitions.get(0).getVersion());
    assertEquals(2, processDefinitions.get(1).getVersion());

    // old deployment was resumed
    ProcessApplicationRegistration registration = deployment2.getProcessApplicationRegistration();
    Set<String> deploymentIds = registration.getDeploymentIds();
    assertEquals(2, deploymentIds.size());
    assertEquals(processEngine.getName(), registration.getProcessEngineName());

    repositoryService.deleteDeployment(deployment1.getId(), true);
    repositoryService.deleteDeployment(deployment2.getId(), true);
  }
View Full Code Here

    // now there are 2 process definitions deployed
    assertEquals(1, processDefinitions.get(0).getVersion());
    assertEquals(2, processDefinitions.get(1).getVersion());

    // old deployment was NOT resumed
    ProcessApplicationRegistration registration = deployment2.getProcessApplicationRegistration();
    Set<String> deploymentIds = registration.getDeploymentIds();
    assertEquals(1, deploymentIds.size());
    assertEquals(processEngine.getName(), registration.getProcessEngineName());

    repositoryService.deleteDeployment(deployment1.getId(), true);
    repositoryService.deleteDeployment(deployment2.getId(), true);
  }
View Full Code Here

    ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
    assertNotNull(processDefinition);
    assertEquals(1, processDefinition.getVersion());

    // registration was performed:
    ProcessApplicationRegistration registration = deployment.getProcessApplicationRegistration();
    Set<String> deploymentIds = registration.getDeploymentIds();
    assertEquals(1, deploymentIds.size());
    assertEquals(processEngine.getName(), registration.getProcessEngineName());

    repositoryService.deleteDeployment(deployment.getId(), true);
  }
View Full Code Here

    // no changes
    processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
    assertNotNull(processDefinition);
    assertEquals(1, processDefinition.getVersion());
    ProcessApplicationRegistration registration = deployment.getProcessApplicationRegistration();
    Set<String> deploymentIds = registration.getDeploymentIds();
    assertEquals(1, deploymentIds.size());
    assertEquals(processEngine.getName(), registration.getProcessEngineName());

    repositoryService.deleteDeployment(deployment.getId(), true);
  }
View Full Code Here

    assertEquals(2, processDefinitionsModel2.size());
    assertEquals(1, processDefinitionsModel2.get(0).getVersion());
    assertEquals(2, processDefinitionsModel2.get(1).getVersion());

    // old deployment was resumed
    ProcessApplicationRegistration registration = deployment2.getProcessApplicationRegistration();
    Set<String> deploymentIds = registration.getDeploymentIds();
    assertEquals(2, deploymentIds.size());
    assertEquals(processEngine.getName(), registration.getProcessEngineName());

    repositoryService.deleteDeployment(deployment1.getId(), true);
    repositoryService.deleteDeployment(deployment2.getId(), true);
  }
View Full Code Here

    if(deploymentBuilder instanceof ProcessApplicationDeploymentBuilder) {
      // for process application deployments, job executor registration is managed by
      // process application manager
      Set<String> processesToRegisterFor = retrieveProcessKeysFromResources(resourcesToIgnore);
      ProcessApplicationRegistration registration = registerProcessApplication(commandContext, deployment, processesToRegisterFor);
      return new ProcessApplicationDeploymentImpl(deployment, registration);
    } else {
      registerWithJobExecutor(commandContext, deployment);
    }
View Full Code Here

  protected String processEngineName;

  public DeployedProcessArchive(ProcessApplicationDeployment deployment) {
    primaryDeploymentId = deployment.getId();
    ProcessApplicationRegistration registration = deployment.getProcessApplicationRegistration();
    allDeploymentIds = registration.getDeploymentIds();
    processEngineName = registration.getProcessEngineName();
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.application.ProcessApplicationRegistration

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.