public void parseElement(BpmnParse bpmnParse, BaseElement element) { if (element instanceof DataObject) { // ignore DataObject elements because they are processed on Process // and Sub process level return; } if (element instanceof FlowElement) { bpmnParse.setCurrentFlowElement((FlowElement) element); } // Execute parse handlers List<BpmnParseHandler> handlers = parseHandlers.get(element.getClass()); if (handlers == null) { LOGGER.warn("Could not find matching parse handler for + " + element.getId() + " this is likely a bug."); } else { for (BpmnParseHandler handler : handlers) { handler.parse(bpmnParse, element); } } }
/** * This method makes coordinates of connection flow better. * @param processDiagramCanvas * @param bpmnModel * @param sourceElement * @param targetElement * @param graphicInfoList * @return */ protected static List<GraphicInfo> connectionPerfectionizer(DefaultProcessDiagramCanvas processDiagramCanvas, BpmnModel bpmnModel, BaseElement sourceElement, BaseElement targetElement, List<GraphicInfo> graphicInfoList) { GraphicInfo sourceGraphicInfo = bpmnModel.getGraphicInfo(sourceElement.getId()); GraphicInfo targetGraphicInfo = bpmnModel.getGraphicInfo(targetElement.getId()); DefaultProcessDiagramCanvas.SHAPE_TYPE sourceShapeType = getShapeType(sourceElement); DefaultProcessDiagramCanvas.SHAPE_TYPE targetShapeType = getShapeType(targetElement); return processDiagramCanvas.connectionPerfectionizer(sourceShapeType, targetShapeType, sourceGraphicInfo, targetGraphicInfo, graphicInfoList); }
protected void createDiagramInterchangeInformation(BaseElement element, List<mxPoint> waypoints) { List<GraphicInfo> graphicInfoForWaypoints = new ArrayList<GraphicInfo>(); for (mxPoint waypoint : waypoints) { GraphicInfo graphicInfo = new GraphicInfo(); graphicInfo.setElement(element); graphicInfo.setX(waypoint.getX()); graphicInfo.setY(waypoint.getY()); graphicInfoForWaypoints.add(graphicInfo); } bpmnModel.addFlowGraphicInfoList(element.getId(), graphicInfoForWaypoints); }
this.subProcessY = subProcessY; this.shapesArrayNode = shapesArrayNode; GraphicInfo graphicInfo = model.getGraphicInfo(baseElement.getId()); flowElementNode = BpmnJsonConverterUtil.createChildShape(baseElement.getId(), stencilId, graphicInfo.getX() - subProcessX + graphicInfo.getWidth(), ObjectNode propertiesNode = objectMapper.createObjectNode(); propertiesNode.put(PROPERTY_OVERRIDE_ID, baseElement.getId()); if (artifact instanceof Association) { Association association = (Association) artifact; if (StringUtils.isNotEmpty(association.getSourceRef()) && association.getSourceRef().equals(baseElement.getId())) { outgoingArrayNode.add(BpmnJsonConverterUtil.createResourceNode(association.getId())); for (Process process : model.getProcesses()) { processDataStoreReferences(process, baseElement.getId(), outgoingArrayNode);
public void convertToXML(XMLStreamWriter xtw, BaseElement baseElement, BpmnModel model) throws Exception { xtw.writeStartElement(getXMLElementName()); boolean didWriteExtensionStartElement = false; writeDefaultAttribute(ATTRIBUTE_ID, baseElement.getId(), xtw); if (baseElement instanceof FlowElement) { writeDefaultAttribute(ATTRIBUTE_NAME, ((FlowElement) baseElement).getName(), xtw);
public void parseElement(BpmnParse bpmnParse, BaseElement element) { if (element instanceof FlowElement) { bpmnParse.setCurrentFlowElement((FlowElement) element); } // Execute parse handlers List<BpmnParseHandler> handlers = parseHandlers.get(element.getClass()); if (handlers == null) { LOGGER.warn("Could not find matching parse handler for + " + element.getId() + " this is likely a bug."); } else { for (BpmnParseHandler handler : handlers) { handler.parse(bpmnParse, element); } } }
public void parseElement(BpmnParse bpmnParse, BaseElement element) { if (element instanceof DataObject) { // ignore DataObject elements because they are processed on Process // and Sub process level return; } if (element instanceof FlowElement) { bpmnParse.setCurrentFlowElement((FlowElement) element); } // Execute parse handlers List<BpmnParseHandler> handlers = parseHandlers.get(element.getClass()); if (handlers == null) { LOGGER.warn("Could not find matching parse handler for + " + element.getId() + " this is likely a bug."); } else { for (BpmnParseHandler handler : handlers) { handler.parse(bpmnParse, element); } } }
@Override public void parse(BpmnParse bpmnParse, BaseElement element) { super.parse(bpmnParse, element); createExecutionListenersOnScope(bpmnParse, ((FlowNode) element).getExecutionListeners(), findActivity(bpmnParse, element.getId())); }
public void parse(BpmnParse bpmnParse, BaseElement element) { ActivityImpl activity = bpmnParse.getCurrentScope().findActivity(element.getId()); activity.addExecutionListener(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_START, ACTIVITY_INSTANCE_START_LISTENER, 0); activity.addExecutionListener(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_END, ACTIVITI_INSTANCE_END_LISTENER); }
writeDefaultAttribute(ATTRIBUTE_ID, baseElement.getId(), xtw); if (baseElement instanceof FlowElement) { writeDefaultAttribute(ATTRIBUTE_NAME, ((FlowElement) baseElement).getName(), xtw);
this.subProcessY = subProcessY; this.shapesArrayNode = shapesArrayNode; GraphicInfo graphicInfo = model.getGraphicInfo(baseElement.getId()); flowElementNode = BpmnJsonConverterUtil.createChildShape(baseElement.getId(), stencilId, graphicInfo.getX() - subProcessX + graphicInfo.getWidth(), graphicInfo.getY() - subProcessY + graphicInfo.getHeight(), graphicInfo.getX() - subProcessX, graphicInfo.getY() - subProcessY); shapesArrayNode.add(flowElementNode); ObjectNode propertiesNode = objectMapper.createObjectNode(); propertiesNode.put(PROPERTY_OVERRIDE_ID, baseElement.getId()); if (artifact instanceof Association) { Association association = (Association) artifact; if (StringUtils.isNotEmpty(association.getSourceRef()) && association.getSourceRef().equals(baseElement.getId())) { outgoingArrayNode.add(BpmnJsonConverterUtil.createResourceNode(association.getId())); processDataStoreReferences(process, baseElement.getId(), outgoingArrayNode);
public void convertToXML(XMLStreamWriter xtw, BaseElement baseElement, BpmnModel model) throws Exception { xtw.writeStartElement(getXMLElementName()); boolean didWriteExtensionStartElement = false; writeDefaultAttribute(ATTRIBUTE_ID, baseElement.getId(), xtw); if (baseElement instanceof FlowElement) { writeDefaultAttribute(ATTRIBUTE_NAME, ((FlowElement) baseElement).getName(), xtw);