use of org.jbpm.bpmn2.xml.di.BPMNShapeHandler.NodeInfo in project jbpm by kiegroup.
the class BPMNShapeHandler method start.
public Object start(final String uri, final String localName, final Attributes attrs, final ExtensibleXmlParser parser) throws SAXException {
parser.startElementBuilder(localName, attrs);
final String elementRef = attrs.getValue("bpmnElement");
NodeInfo nodeInfo = new NodeInfo(elementRef);
ProcessInfo processInfo = (ProcessInfo) parser.getParent();
processInfo.addNodeInfo(nodeInfo);
return nodeInfo;
}
use of org.jbpm.bpmn2.xml.di.BPMNShapeHandler.NodeInfo in project jbpm by kiegroup.
the class BPMNPlaneHandler method end.
public Object end(final String uri, final String localName, final ExtensibleXmlParser parser) throws SAXException {
parser.endElementBuilder();
ProcessInfo processInfo = (ProcessInfo) parser.getCurrent();
List<Process> processes = ((ProcessBuildData) parser.getData()).getProcesses();
RuleFlowProcess process = null;
for (Process p : processes) {
if (p.getId() != null && p.getId().equals(processInfo.getProcessRef())) {
process = (RuleFlowProcess) p;
break;
}
}
if (process != null) {
for (NodeInfo nodeInfo : processInfo.getNodeInfos()) {
processNodeInfo(nodeInfo, process.getNodes());
}
postProcessNodeOffset(process.getNodes(), 0, 0);
for (ConnectionInfo connectionInfo : processInfo.getConnectionInfos()) {
if (connectionInfo.getBendpoints() != null) {
processConnectionInfo(connectionInfo, process.getNodes());
}
}
}
return processInfo;
}
Aggregations