I have a scenario to test which depends on having more than one version of a given process deployed to the engine.I'm using the
@Deployment(resources = { "process/test.bpmn" })
annotation on other tests and it works just fine. Here are some attempts I made, but they've all failed:1- @Deployment(resources = { "process/test.bpmn", "process/test.bpmn", "process/test.bpmn", "process/test.bpmn" }) Does not generate error, but only one process is deployed2- @Deployment(resources = { "process/test.bpmn", "process/test-2.bpmn", "process/test-3.bpmn", "process/test-4.bpmn" }) where test-2.bpmn, test-3.bpmn and test-4.bpmn are copies of test.bpmn. This generates the following error:org.activiti.engine.ActivitiException: The deployment contains process definitions with the same key (process id atrribute), this is not allowed
3-
InputStream is = this.getClass().getResource("/process/test.bpmn"));
activitiRule.getRepositoryService().createDeployment().name("test").addInputStream("test", is).deploy();
activitiRule.getRepositoryService().createDeployment().name("test").addInputStream("test", is).deploy();
activitiRule.getRepositoryService().createDeployment().name("test").addInputStream("test", is).deploy();
activitiRule.getRepositoryService().createDeployment().name("test").addInputStream("test", is).deploy();
This does not deploy any process to the engine