}
@Test
public void testDeployProcessArchive() {
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery()
.processDefinitionKey("testDeployProcessArchive")
.list();
Assert.assertEquals(1, processDefinitions.size());
org.camunda.bpm.engine.repository.Deployment deployment = repositoryService.createDeploymentQuery()
.deploymentId(processDefinitions.get(0).getDeploymentId())
.singleResult();
Set<String> registeredProcessApplications = BpmPlatform.getProcessApplicationService().getProcessApplicationNames();
boolean containsProcessApplication = false;
// the process application name is used as name for the db deployment
for (String appName : registeredProcessApplications) {
if (appName.equals(deployment.getName())) {
containsProcessApplication = true;
}
}
assertTrue(containsProcessApplication);
// manually delete process definition here (to clean up)
repositoryService.deleteDeployment(deployment.getId(), true);
}