public void execute() { // Reset any previous DI information bpmnModel.getLocationMap().clear(); bpmnModel.getFlowLocationMap().clear(); // Generate DI for each process for (Process process : bpmnModel.getProcesses()) { layout(process); // Operations that can only be done after all elements have received DI translateNestedSubprocesses(process); } }
for (String bpmnReference : bpmnModel.getFlowLocationMap().keySet()) { if (bpmnModel.getFlowElement(bpmnReference) == null) { processDefinition.setGraphicalNotationDefined(true); for (String edgeId : bpmnModel.getFlowLocationMap().keySet()) { if (bpmnModel.getFlowElement(edgeId) != null) { createBPMNEdge(edgeId, bpmnModel.getFlowLocationGraphicInfo(edgeId));
for (String elementId : model.getFlowLocationMap().keySet()) { FlowElement flowElement = model.getFlowElement(elementId); String belongsTo = null; for (String elementId : model.getFlowLocationMap().keySet()) {
for (String bpmnReference : bpmnModel.getFlowLocationMap().keySet()) { if (bpmnModel.getFlowElement(bpmnReference) == null) { for (String edgeId : bpmnModel.getFlowLocationMap().keySet()) { if (bpmnModel.getFlowElement(edgeId) != null) { createBPMNEdge(edgeId, bpmnModel.getFlowLocationGraphicInfo(edgeId));
protected void translateNestedSubprocessElements(SubProcess subProcess) { GraphicInfo subProcessGraphicInfo = bpmnModel.getLocationMap().get(subProcess.getId()); double subProcessX = subProcessGraphicInfo.getX(); double subProcessY = subProcessGraphicInfo.getY(); List<SubProcess> nestedSubProcesses = new ArrayList<>(); for (FlowElement flowElement : subProcess.getFlowElements()) { if (flowElement instanceof SequenceFlow) { List<GraphicInfo> graphicInfos = bpmnModel.getFlowLocationMap().get(flowElement.getId()); for (GraphicInfo graphicInfo : graphicInfos) { graphicInfo.setX(graphicInfo.getX() + subProcessX + subProcessMargin); graphicInfo.setY(graphicInfo.getY() + subProcessY + subProcessMargin); } } else if (!(flowElement instanceof DataObject)) { // Regular element GraphicInfo graphicInfo = bpmnModel.getLocationMap().get(flowElement.getId()); graphicInfo.setX(graphicInfo.getX() + subProcessX + subProcessMargin); graphicInfo.setY(graphicInfo.getY() + subProcessY + subProcessMargin); } if (flowElement instanceof SubProcess) { nestedSubProcesses.add((SubProcess) flowElement); } } // Continue for next level of nested subprocesses for (SubProcess nestedSubProcess : nestedSubProcesses) { translateNestedSubprocessElements(nestedSubProcess); } }
if (!bpmnModel.getFlowLocationMap().isEmpty()) { for (String bpmnReference : bpmnModel.getFlowLocationMap().keySet()) { if (bpmnModel.getFlowElement(bpmnReference) == null) {
Map<String, List<GraphicInfo>> flowLocationMap = bpmnModel.getFlowLocationMap(); for (String flowId : flowLocationMap.keySet()) { if (flowFromStart.getId().equals(flowId)) {
Map<String, List<GraphicInfo>> flowLocationMap = bpmnModel.getFlowLocationMap(); for (String flowId : flowLocationMap.keySet()) { if (flowFromStart.getId().equals(flowId)) {