03-01-2013 10:53 AM
03-04-2013 07:05 AM
03-04-2013 10:26 AM
/**
* Returns the {@link BpmnModel} corresponding with the process definition with
* the provided process definition id. The {@link BpmnModel} is a pojo versions
* of the BPMN 2.0 xml and can be used to introspect the process definition
* using regular Java.
*/
BpmnModel getBpmnModel(String processDefinitionId);
03-04-2013 06:30 PM
String process_def_id = processDefinition.getDeploymentId();
String deploymentID = process_def_id;
List<String> deploymentResourceNames = repositoryService.getDeploymentResourceNames(deploymentID);
String toString = deploymentResourceNames.get(0).toString();
InputStream Diagram_1 = new FileInputStream(toString);
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document docDiagram1 = dBuilder.parse(Diagram_1);
docDiagram1.getDocumentElement().normalize();
Element nListDiagram1 = (Element) docDiagram1.getElementsByTagName("process").item(0);
int contatore=0;
for(int g=0;g<nListDiagram1.getChildNodes().getLength();g++){
Node currentNode = nListDiagram1.getChildNodes().item(g);
if((currentNode.getNodeName() != "sequenceFlow")){
if(currentNode.getNodeName() != "#text"){
System.out.println(currentNode.getNodeName());
contatore++;
}
}
}
System.out.println(contatore);
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.