use of org.jbpm.bpmn2.xml.di.BPMNEdgeHandler.ConnectionInfo in project jbpm by kiegroup.
the class BPMNEdgeHandler 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");
ConnectionInfo info = new ConnectionInfo(elementRef);
ProcessInfo processInfo = (ProcessInfo) parser.getParent();
processInfo.addConnectionInfo(info);
return info;
}
use of org.jbpm.bpmn2.xml.di.BPMNEdgeHandler.ConnectionInfo 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