This content has been marked as final.
Show 4 replies
-
1. Re: Process definition xml
kukeltje Aug 29, 2009 5:23 AM (in response to gleenders)in 4? Yes, look e.g. at the sourcecode of the form integration module. It retrieves the .ftl files from the deployment.
-
2. Re: Process definition xml
gleenders Aug 31, 2009 4:31 AM (in response to gleenders)Ronald thanks a lot. You helped me out here.
The following does the trick:ExecutionService executionService = PE.getExecutionService(); RepositoryService repositoryService = PE.getRepositoryService(); //Find the process instance. ProcessInstance processInstance = executionService.findProcessInstanceById(processInstanceById); String processDefinitionId = processInstance.getProcessDefinitionId(); //Find the processDefinition. ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).uniqueResult(); //long deploymentId = Long.parseLong(processDefinition.getDeploymentId()); //DeploymentImpl deployment = (DeploymentImpl)repositoryService.createDeploymentQuery().deploymentDbid(deploymentId).uniqueResult(); InputStream in = repositoryService.getResourceAsStream(processDefinition.getDeploymentId(), "xmlstring.jpdl.xml"); if (in != null){ return in.toString(); } else { return null; }
but this created a new problem, currently the second parameter (xmlstring.jpdl.xml) is hard-code. I can't find a way to query this resource name. Can you help me out?
Thanks -
3. Re: Process definition xml
kukeltje Aug 31, 2009 7:30 AM (in response to gleenders)Unfortunately (afaik) you cannot do a 'ls/dir' on it. But what you *could* do is store an additional file in there where you do some kind of mapping? (me: just having wild thoughts)
-
4. Re: Process definition xml
jbarrez Sep 1, 2009 8:41 AM (in response to gleenders)@Gert: this is an interesting suggestion, the mapping could be provided by the framework itself. Can you file an issue in Jira exactly describing what would be the easiest solution for you, so we can discuss/plan it?