use of org.jbpm.bpmn2.core.Definitions in project jbpm by kiegroup.
the class XmlBPMNProcessDumper method visitErrors.
protected void visitErrors(Definitions definitions, StringBuilder xmlDump) {
if (definitions == null) {
return;
}
List<Error> errors = definitions.getErrors();
if (errors == null || errors.isEmpty()) {
return;
}
for (org.jbpm.bpmn2.core.Error error : errors) {
String id = XmlBPMNProcessDumper.replaceIllegalCharsAttribute(error.getId());
String code = error.getErrorCode();
xmlDump.append(" <error id=\"" + id + "\"");
if (error.getErrorCode() != null) {
code = XmlBPMNProcessDumper.replaceIllegalCharsAttribute(code);
xmlDump.append(" errorCode=\"" + code + "\"");
}
String structureRef = error.getStructureRef();
if (structureRef != null) {
structureRef = XmlBPMNProcessDumper.replaceIllegalCharsAttribute(structureRef);
xmlDump.append(" structureRef=\"" + structureRef + "\"");
}
xmlDump.append("/>" + EOL);
}
}
use of org.jbpm.bpmn2.core.Definitions in project jbpm by kiegroup.
the class ProcessHandler method end.
@SuppressWarnings("unchecked")
public Object end(final String uri, final String localName, final ExtensibleXmlParser parser) throws SAXException {
parser.endElementBuilder();
RuleFlowProcess process = (RuleFlowProcess) parser.getCurrent();
List<IntermediateLink> throwLinks = (List<IntermediateLink>) process.getMetaData(LINKS);
linkIntermediateLinks(process, throwLinks);
List<SequenceFlow> connections = (List<SequenceFlow>) process.getMetaData(CONNECTIONS);
linkConnections(process, connections);
linkBoundaryEvents(process);
// This must be done *after* linkConnections(process, connections)
// because it adds hidden connections for compensations
List<Association> associations = (List<Association>) process.getMetaData(ASSOCIATIONS);
linkAssociations((Definitions) process.getMetaData("Definitions"), process, associations);
List<Lane> lanes = (List<Lane>) process.getMetaData(LaneHandler.LANES);
assignLanes(process, lanes);
postProcessNodes(process, process);
return process;
}
Aggregations