use of org.camunda.bpm.engine.repository.DeploymentBuilder in project camunda-bpm-platform by camunda.
the class RepositoryServiceTest method testDeleteDeploymentWithoutSkipIoMappings.
public void testDeleteDeploymentWithoutSkipIoMappings() {
DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().addClasspathResource("org/camunda/bpm/engine/test/api/repository/RepositoryServiceTest.testDeleteDeploymentSkipIoMappings.bpmn20.xml");
String deploymentId = deploymentBuilder.deploy().getId();
runtimeService.startProcessInstanceByKey("ioMappingProcess");
// Try to delete the deployment
try {
repositoryService.deleteDeployment(deploymentId, true, false, false);
fail("Exception expected");
} catch (Exception e) {
// Exception expected when deleting deployment with running process
// assert (e.getMessage().contains("Exception when output mapping is executed"));
assertTextPresent("Exception when output mapping is executed", e.getMessage());
}
repositoryService.deleteDeployment(deploymentId, true, false, true);
}
Aggregations