.name("deployment")
.addClasspathResource("org/camunda/bpm/engine/test/api/repository/version1.bpmn20.xml")
.deploy();
// process is deployed:
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
assertNotNull(processDefinition);
assertEquals(1, processDefinition.getVersion());
// deploy update with no changes:
deployment = repositoryService.createDeployment(processApplication.getReference())
.name("deployment")
.enableDuplicateFiltering()
.addClasspathResource("org/camunda/bpm/engine/test/api/repository/version1.bpmn20.xml")
.deploy();
// 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());