03-20-2012 05:24 AM
repositoryService.createDeployment().addInputStream(identifier, inputStream).deploy();
and the second time I need to specify it inside the id element of the process definition.03-20-2012 10:27 AM
03-20-2012 11:22 AM
String processIdentifier = "extraction";
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
// Load the original process definition from hard disk.
String processDefinition1 = FileUtils.readFileToString("processDefinition1.bpmn20.xml");
// deploy original process definition. The first problem occurs here since I can not be sure that the id attribute of the process element in "processDefinition1.bpmn20.xml" is equal to "processIdentifier".
repositoryService.createDeployment().addString(processIdentifier, processDefinition1).deploy();
// maybe run the process once.
RuntimeService runtimeService = processEngine.getRuntimeService();
runtimeService.startProcessInstanceByKey(processIdentifier);
// Load the changed process definition from hard disk.
String processDefinition2 = FileUtils.readFileToString("processDefinition2.bpmn20.xml");
// exchange the old process definition with the new one.
String deploymentIdentifier = repositoryService.createProcessDefinitionQuery().processDefinitionId(processIdentifier).list().get(0).getId();
repositoryService.deleteDeployment(deploymentIdentifier);
repositoryService.createDeployment().addString(processIdentifier,processDefinition2).deploy();
// now the changed process definition should run but I get: org.activiti.engine.ActivitiException: no processes deployed with key 'extraction'
runtimeService.startProcessInstanceByKey(processIdentifier);
05-19-2013 10:26 PM
05-22-2013 12:50 AM
05-22-2013 05:31 AM
05-22-2013 11:10 AM
05-22-2013 09:17 PM
05-23-2013 03:41 AM
05-23-2013 09:04 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.