use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class InvoiceProcessApplication method createDeployment.
@Override
public void createDeployment(String processArchiveName, DeploymentBuilder deploymentBuilder) {
ProcessEngine processEngine = BpmPlatform.getProcessEngineService().getProcessEngine("default");
// is deployed the first time
if (processEngine != null) {
RepositoryService repositoryService = processEngine.getRepositoryService();
if (!isProcessDeployed(repositoryService, "invoice")) {
ClassLoader classLoader = getProcessApplicationClassloader();
repositoryService.createDeployment(this.getReference()).addInputStream("invoice.v1.bpmn", classLoader.getResourceAsStream("invoice.v1.bpmn")).addInputStream("invoiceBusinessDecisions.dmn", classLoader.getResourceAsStream("invoiceBusinessDecisions.dmn")).addInputStream("review-invoice.cmmn", classLoader.getResourceAsStream("review-invoice.cmmn")).deploy();
}
}
}
use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestMultipleClasspathRoots method testMultipleClasspathRoots.
@Test
public void testMultipleClasspathRoots() {
ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(ProcessEngine.class);
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();
long count = query.count();
Assert.assertEquals(1, count);
}
use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestWarDeployment method testDeployProcessArchive.
@Test
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 TestWarDeploymentDeployAllOnSingleChange 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(2, count);
}
use of org.camunda.bpm.engine.RepositoryService in project camunda-bpm-platform by camunda.
the class TestWarDeploymentDeployChangedOnlyWithJarAsLib method testDeployProcessArchive.
@Test
@OperateOnDeployment(value = PA2)
public void testDeployProcessArchive() {
ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(ProcessEngine.class);
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
long count = repositoryService.createProcessDefinitionQuery().processDefinitionKey("testDeployProcessArchiveUnchanged").count();
Assert.assertEquals(1, count);
}
Aggregations