use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestWarDeploymentDuplicateFiltering method testDeployProcessArchive.
@Test
@OperateOnDeployment(value = PA2)
public void testDeployProcessArchive() {
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
long count = repositoryService.createProcessDefinitionQuery().processDefinitionKey("testDeployProcessArchive").count();
Assert.assertEquals(1, count);
}
use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestWarDeploymentIsDeployChangedOnly method testDeployProcessArchive.
@Test
@OperateOnDeployment(value = PA2)
public void testDeployProcessArchive() {
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
long count = repositoryService.createProcessDefinitionQuery().processDefinitionKey("testDeployProcessArchive").count();
Assert.assertEquals(1, count);
// validate registrations:
ProcessApplicationService processApplicationService = BpmPlatform.getProcessApplicationService();
Set<String> processApplicationNames = processApplicationService.getProcessApplicationNames();
boolean resumedRegistrationFound = false;
for (String paName : processApplicationNames) {
ProcessApplicationInfo processApplicationInfo = processApplicationService.getProcessApplicationInfo(paName);
List<ProcessApplicationDeploymentInfo> deploymentInfo = processApplicationInfo.getDeploymentInfo();
if (deploymentInfo.size() == 2) {
if (resumedRegistrationFound) {
Assert.fail("Cannot have two registrations");
}
resumedRegistrationFound = true;
}
}
Assert.assertTrue("Previous version of the deployment was not resumed", resumedRegistrationFound);
}
use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestWarDeploymentResumePreviousOff method testDeployProcessArchive.
@Test
@OperateOnDeployment(value = PA2)
public void testDeployProcessArchive() {
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
long count = repositoryService.createProcessDefinitionQuery().processDefinitionKey("testDeployProcessArchive").count();
Assert.assertEquals(2, count);
// validate registrations:
ProcessApplicationService processApplicationService = BpmPlatform.getProcessApplicationService();
Set<String> processApplicationNames = processApplicationService.getProcessApplicationNames();
for (String paName : processApplicationNames) {
ProcessApplicationInfo processApplicationInfo = processApplicationService.getProcessApplicationInfo(paName);
List<ProcessApplicationDeploymentInfo> deploymentInfo = processApplicationInfo.getDeploymentInfo();
if (deploymentInfo.size() == 2) {
Assert.fail("Previous version of the deployment must not be resumed");
}
}
}
use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestWarDeploymentWithDmn method testDeployProcessArchive.
@Test
public void testDeployProcessArchive() {
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
long count = repositoryService.createDecisionDefinitionQuery().decisionDefinitionKey("testDeployProcessArchiveWithDmn").count();
Assert.assertEquals(1, count);
}
use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestAdditionalResourceSuffixes method testDeployProcessArchive.
@Test
public void testDeployProcessArchive() {
assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery().processDefinitionKey("invoice-it");
assertEquals(1, processDefinitionQuery.count());
ProcessDefinition processDefinition = processDefinitionQuery.singleResult();
String deploymentId = repositoryService.createDeploymentQuery().deploymentId(processDefinition.getDeploymentId()).singleResult().getId();
List<Resource> deploymentResources = repositoryService.getDeploymentResources(deploymentId);
assertEquals(3, deploymentResources.size());
}
Aggregations