As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
RepositoryServiceImpl repo = (RepositoryServiceImpl) processEngine.getRepositoryService(); ProcessDefinitionEntity pde = (ProcessDefinitionEntity) repositoryService .createProcessDefinitionQuery() .processDefinitionKey("MyProcessDefinitionKey") .latestVersion().singleResult(); pde = (ProcessDefinitionEntity) repo.getDeployedProcessDefinition(pde.getId()); Properties prop = new Properties(); prop.load(new StringReader(pde.getDescription())); System.out.println(prop.getProperty("context")); System.out.println(prop.getProperty("desc")); System.out.println("process: " + pde.getDescription()); Map<String,TaskDefinition> MyTableTasks = pde.getTaskDefinitions();
what it could change ?
<br> @Deployment(resources = {<br> "org/activiti/engine/test/api/oneTaskProcess.bpmn20.xml"})<br> public void testNPE() throws IOException {<br> RepositoryServiceImpl repo = (RepositoryServiceImpl) processEngine.getRepositoryService();<br> ProcessDefinitionEntity pde = (ProcessDefinitionEntity) repositoryService<br> .createProcessDefinitionQuery()<br> .processDefinitionKey("oneTaskProcess")<br> .latestVersion().singleResult();<br> pde = (ProcessDefinitionEntity) repo.getDeployedProcessDefinition(pde.getId());<br> Properties prop = new Properties();<br> prop.load(new StringReader(pde.getDescription()));<br> System.out.println(prop.getProperty("context"));<br> System.out.println(prop.getProperty("desc"));<br> System.out.println("process: " + pde.getDescription());<br> Map<String, TaskDefinition> MyTableTasks = pde.getTaskDefinitions();<br> }<br>
<br> @Deployment(resources = {<br> "org/activiti/engine/test/api/oneTaskProcess.bpmn20.xml"})<br> public void testNPE() throws IOException {<br> RepositoryServiceImpl repo = (RepositoryServiceImpl) processEngine.getRepositoryService();<br> ProcessDefinitionEntity pde = (ProcessDefinitionEntity) repositoryService<br> .createProcessDefinitionQuery()<br> .processDefinitionKey("oneTaskProcess")<br> .latestVersion().singleResult();<br> pde = (ProcessDefinitionEntity) repo.getDeployedProcessDefinition(pde.getId());<br> Properties prop = new Properties();<br> prop.load(new StringReader(pde.getDescription()));<br> System.out.println(prop.getProperty("context"));<br> System.out.println(prop.getProperty("desc"));<br> System.out.println("process: " + pde.getDescription());<br> Map<String, TaskDefinition> myTableTasks = pde.getTaskDefinitions();<br> assertNotNull(myTableTasks);<br> assertNotNull(pde.getDescription());<br> }<br>