public static void writeLanes(Process process, XMLStreamWriter xtw) throws Exception { if (!process.getLanes().isEmpty()) { xtw.writeStartElement(ELEMENT_LANESET); xtw.writeAttribute(ATTRIBUTE_ID, "laneSet_" + process.getId()); for (Lane lane : process.getLanes()) { xtw.writeStartElement(ELEMENT_LANE); xtw.writeAttribute(ATTRIBUTE_ID, lane.getId()); if (StringUtils.isNotEmpty(lane.getName())) { xtw.writeAttribute(ATTRIBUTE_NAME, lane.getName()); } boolean didWriteExtensionStartElement = BpmnXMLUtil.writeExtensionElements(lane, false, xtw); if (didWriteExtensionStartElement) { xtw.writeEndElement(); } for (String flowNodeRef : lane.getFlowReferences()) { xtw.writeStartElement(ELEMENT_FLOWNODE_REF); xtw.writeCharacters(flowNodeRef); xtw.writeEndElement(); } xtw.writeEndElement(); } xtw.writeEndElement(); } } }
public void parse(XMLStreamReader xtr, Process activeProcess, BpmnModel model) throws Exception { Lane lane = new Lane(); BpmnXMLUtil.addXMLLocation(lane, xtr); lane.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID)); lane.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME)); lane.setParentProcess(activeProcess); activeProcess.getLanes().add(lane); BpmnXMLUtil.parseChildElements(ELEMENT_LANE, lane, xtr, model); } }
if (process.getFlowElements().isEmpty() && process.getLanes().isEmpty()) {
if (process.getFlowElements().isEmpty() && process.getLanes().isEmpty()) {
laneNode)); lane.setParentProcess(process); process.getLanes().add(lane);
if (process != null) { Map<String, ArrayNode> laneMap = new HashMap<String, ArrayNode>(); for (Lane lane : process.getLanes()) { GraphicInfo laneGraphicInfo = model.getGraphicInfo(lane.getId()); if (laneGraphicInfo == null) { for (Lane lane : process.getLanes()) { if (lane.getFlowReferences().contains(lookForElement.getId())) { laneGraphicInfo = model.getGraphicInfo(lane.getId());
for (Lane lane : process.getLanes()) { GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(lane.getId()); processDiagramCanvas.drawPoolOrLane(lane.getId(),
for (Lane l : process.getLanes()) {
public static void writeLanes(Process process, XMLStreamWriter xtw) throws Exception { if(process.getLanes().size() > 0) { xtw.writeStartElement(ELEMENT_LANESET); xtw.writeAttribute(ATTRIBUTE_ID, "laneSet_" + process.getId()); for (Lane lane : process.getLanes()) { xtw.writeStartElement(ELEMENT_LANE); xtw.writeAttribute(ATTRIBUTE_ID, lane.getId()); if(StringUtils.isNotEmpty(lane.getName())) { xtw.writeAttribute(ATTRIBUTE_NAME, lane.getName()); } for (String flowNodeRef : lane.getFlowReferences()) { xtw.writeStartElement(ATTRIBUTE_FLOWNODE_REF); xtw.writeCharacters(flowNodeRef); xtw.writeEndElement(); } xtw.writeEndElement(); } xtw.writeEndElement(); } } }
public void parse(XMLStreamReader xtr, Process activeProcess) throws Exception { Lane lane = new Lane(); BpmnXMLUtil.addXMLLocation(lane, xtr); lane.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID)); lane.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME)); lane.setParentProcess(activeProcess); activeProcess.getLanes().add(lane); while (xtr.hasNext()) { xtr.next(); if (xtr.isStartElement() && ATTRIBUTE_FLOWNODE_REF.equalsIgnoreCase(xtr.getLocalName())) { lane.getFlowReferences().add(xtr.getElementText()); } else if(xtr.isEndElement() && ELEMENT_LANE.equalsIgnoreCase(xtr.getLocalName())) { break; } } } }
public static void writeLanes(Process process, XMLStreamWriter xtw) throws Exception { if (!process.getLanes().isEmpty()) { xtw.writeStartElement(ELEMENT_LANESET); xtw.writeAttribute(ATTRIBUTE_ID, "laneSet_" + process.getId()); for (Lane lane : process.getLanes()) { xtw.writeStartElement(ELEMENT_LANE); xtw.writeAttribute(ATTRIBUTE_ID, lane.getId()); if (StringUtils.isNotEmpty(lane.getName())) { xtw.writeAttribute(ATTRIBUTE_NAME, lane.getName()); } boolean didWriteExtensionStartElement = BpmnXMLUtil.writeExtensionElements(lane, false, xtw); if (didWriteExtensionStartElement) { xtw.writeEndElement(); } for (String flowNodeRef : lane.getFlowReferences()) { xtw.writeStartElement(ELEMENT_FLOWNODE_REF); xtw.writeCharacters(flowNodeRef); xtw.writeEndElement(); } xtw.writeEndElement(); } xtw.writeEndElement(); } } }
public void parse(XMLStreamReader xtr, Process activeProcess, BpmnModel model) throws Exception { Lane lane = new Lane(); BpmnXMLUtil.addXMLLocation(lane, xtr); lane.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID)); lane.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME)); lane.setParentProcess(activeProcess); activeProcess.getLanes().add(lane); BpmnXMLUtil.parseChildElements(ELEMENT_LANE, lane, xtr, model); } }
if(process.getFlowElements().size() == 0 && process.getLanes().size() == 0) {
if (process.getFlowElements().isEmpty() && process.getLanes().isEmpty()) {
if (process.getFlowElements().isEmpty() && process.getLanes().isEmpty()) {
lane.setName(JsonConverterUtil.getPropertyValueAsString(PROPERTY_NAME, laneNode)); lane.setParentProcess(process); process.getLanes().add(lane);
if (process != null) { Map<String, ArrayNode> laneMap = new HashMap<String, ArrayNode>(); for (Lane lane : process.getLanes()) { GraphicInfo laneGraphicInfo = model.getGraphicInfo(lane.getId()); if (laneGraphicInfo == null) for (Lane lane : process.getLanes()) { if (lane.getFlowReferences().contains(lookForElement.getId())) { laneGraphicInfo = model.getGraphicInfo(lane.getId());
protected static ProcessDiagramCanvas generateDiagram(BpmnModel bpmnModel, List<String> highLightedActivities, List<String> highLightedFlows) { ProcessDiagramCanvas processDiagramCanvas = initProcessDiagramCanvas(bpmnModel); // // Draw pool shape, if process is participant in collaboration for (Pool pool : bpmnModel.getPools()) { GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(pool.getId()); processDiagramCanvas.drawPoolOrLane(pool.getName(), (int) graphicInfo.getX(), (int) graphicInfo.getY(), (int) graphicInfo.getWidth(), (int) graphicInfo.getHeight()); } // Draw lanes for (Process process : bpmnModel.getProcesses()) { for (Lane lane : process.getLanes()) { GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(lane.getId()); processDiagramCanvas.drawPoolOrLane(lane.getName(), (int) graphicInfo.getX(), (int) graphicInfo.getY(), (int) graphicInfo.getWidth(), (int) graphicInfo.getHeight()); } } // Draw activities and their sequence-flows for (FlowNode flowNode : bpmnModel.getProcesses().get(0).findFlowElementsOfType(FlowNode.class)) { drawActivity(processDiagramCanvas, bpmnModel, flowNode, highLightedActivities, highLightedFlows); } return processDiagramCanvas; }
for (Lane l : process.getLanes()) {