use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestWarDeploymentDeployChangedOnly 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);
count = repositoryService.createProcessDefinitionQuery().processDefinitionKey("testDeployProcessArchiveUnchanged").count();
Assert.assertEquals(1, count);
}
use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestWarDeploymentResumePreviousOnProcessDefinitionKey method testDeployProcessArchive.
@Test
@OperateOnDeployment(value = PA2)
public void testDeployProcessArchive() {
assertThat(processEngine, is(notNullValue()));
RepositoryService repositoryService = processEngine.getRepositoryService();
long count = repositoryService.createProcessDefinitionQuery().processDefinitionKey("testDeployProcessArchive").count();
assertThat(count, is(2L));
// validate registrations:
ProcessApplicationService processApplicationService = BpmPlatform.getProcessApplicationService();
Set<String> processApplicationNames = processApplicationService.getProcessApplicationNames();
// we have two PAs, one from the first deployment and one from the second and only one (the second) is allowed to have two deployments
boolean resumedRegistrationFound = false;
for (String paName : processApplicationNames) {
ProcessApplicationInfo processApplicationInfo = processApplicationService.getProcessApplicationInfo(paName);
List<ProcessApplicationDeploymentInfo> deploymentInfo = processApplicationInfo.getDeploymentInfo();
if (deploymentInfo.size() == 2) {
if (resumedRegistrationFound) {
fail("Cannot have two registrations");
}
resumedRegistrationFound = true;
}
}
assertThat("Previous version of the deployment was not resumed", resumedRegistrationFound, is(true));
}
use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestWarDeploymentWithCmmn method testDeployProcessArchive.
@Test
public void testDeployProcessArchive() {
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
long count = repositoryService.createCaseDefinitionQuery().caseDefinitionKey("testDeployProcessArchiveWithCmmn").count();
Assert.assertEquals(1, count);
}
use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestFoxPlatformClientAsEjbModule_onePaAsLib method testOnePaAsLib.
@Test
public void testOnePaAsLib() {
ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(ProcessEngine.class);
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 TestFoxPlatformClientAsEjbModule_twoPasAsLib method testTwoPasAsLib.
@Test
public void testTwoPasAsLib() {
ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(ProcessEngine.class);
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
long count = repositoryService.createProcessDefinitionQuery().processDefinitionKey("process1").count();
Assert.assertEquals(1, count);
count = repositoryService.createProcessDefinitionQuery().processDefinitionKey("process2").count();
Assert.assertEquals(1, count);
}
Aggregations