for (BPMNDiagram bpmnDiagram : BPMNDiagramList) {
for (DiagramElement diagramElement : bpmnDiagram.getPlane().getPlaneElement()) {
if (diagramElement instanceof BPMNShape) {
BPMNShape bpmnShape = (BPMNShape) diagramElement;
Map<String, Object> positionMap=new HashMap<String, Object>();
BaseElement bpmnElement=getBaseElement(bpmnShape.getBpmnElement());
if(bpmnElement==null){
continue;
}
//判断如果是折叠起来的子流程,则将其所有的子元素的坐标替换成父元素的
if(bpmnElement instanceof SubProcess){
if(bpmnShape.isIsExpanded() == false){
List<String> excludeNodeIds = null;
excludeNodeIds = getExcluesElement((SubProcess)bpmnElement);
tmpMap.put(bpmnElement.getId(), excludeNodeIds);
}
}
float x=bpmnShape.getBounds().getX();
float y=bpmnShape.getBounds().getY();
float height=bpmnShape.getBounds().getHeight();
float width=bpmnShape.getBounds().getWidth();
//height,width,x,y
positionMap.put("x",x);
positionMap.put("y",y);
positionMap.put("height",height);
positionMap.put("width",width);
positionInfo.put(bpmnElement.getId(), positionMap);
}
if (diagramElement instanceof BPMNEdge) {
//BPMNEdge bpmnEdge = (BPMNEdge) diagramElement;
}