[jboss-user] [jBPM Users] - Re: Process definition xml

gleenders do-not-reply at jboss.com
Mon Aug 31 04:31:24 EDT 2009


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

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252541#4252541

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252541



More information about the jboss-user mailing list