public Warning(String warningMessage, BaseElement element) { this.warningMessage = warningMessage; this.resource = element.getId(); line = element.getXmlRowNumber(); column = element.getXmlColumnNumber(); }
@Override protected String getStencilId(BaseElement baseElement) { //see http://forum.flowable.org/t/collapsed-subprocess-navigation-in-the-web-based-bpmn-modeler/138/19 GraphicInfo graphicInfo = model.getGraphicInfo(baseElement.getId()); Boolean isExpanded = graphicInfo.getExpanded(); if (isExpanded != null && isExpanded == false) { return STENCIL_COLLAPSED_SUB_PROCESS; } else { return STENCIL_SUB_PROCESS; } }
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 + {} this is likely a bug.", element.getId()); } 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 + {} this is likely a bug.", element.getId()); } else { for (BpmnParseHandler handler : handlers) { handler.parse(bpmnParse, element); } } }
public Warning(String warningMessage, BaseElement element) { this.warningMessage = warningMessage; this.resource = element.getId(); line = element.getXmlRowNumber(); column = element.getXmlColumnNumber(); }
public Problem(String errorMessage, BaseElement element) { this.errorMessage = errorMessage; this.resource = element.getId(); this.line = element.getXmlRowNumber(); this.column = element.getXmlColumnNumber(); }
public Problem(String errorMessage, BaseElement element) { this.errorMessage = errorMessage; this.resource = element.getId(); this.line = element.getXmlRowNumber(); this.column = element.getXmlColumnNumber(); }
public void setValues(BaseElement otherElement) { setId(otherElement.getId()); extensionElements = new LinkedHashMap<>(); if (otherElement.getExtensionElements() != null && !otherElement.getExtensionElements().isEmpty()) { for (String key : otherElement.getExtensionElements().keySet()) { List<ExtensionElement> otherElementList = otherElement.getExtensionElements().get(key); if (otherElementList != null && !otherElementList.isEmpty()) { List<ExtensionElement> elementList = new ArrayList<>(); for (ExtensionElement extensionElement : otherElementList) { elementList.add(extensionElement.clone()); } extensionElements.put(key, elementList); } } } attributes = new LinkedHashMap<>(); if (otherElement.getAttributes() != null && !otherElement.getAttributes().isEmpty()) { for (String key : otherElement.getAttributes().keySet()) { List<ExtensionAttribute> otherAttributeList = otherElement.getAttributes().get(key); if (otherAttributeList != null && !otherAttributeList.isEmpty()) { List<ExtensionAttribute> attributeList = new ArrayList<>(); for (ExtensionAttribute extensionAttribute : otherAttributeList) { attributeList.add(extensionAttribute.clone()); } attributes.put(key, attributeList); } } } }
public void setValues(BaseElement otherElement) { setId(otherElement.getId()); extensionElements = new LinkedHashMap<>(); if (otherElement.getExtensionElements() != null && !otherElement.getExtensionElements().isEmpty()) { for (String key : otherElement.getExtensionElements().keySet()) { List<ExtensionElement> otherElementList = otherElement.getExtensionElements().get(key); if (otherElementList != null && !otherElementList.isEmpty()) { List<ExtensionElement> elementList = new ArrayList<>(); for (ExtensionElement extensionElement : otherElementList) { elementList.add(extensionElement.clone()); } extensionElements.put(key, elementList); } } } attributes = new LinkedHashMap<>(); if (otherElement.getAttributes() != null && !otherElement.getAttributes().isEmpty()) { for (String key : otherElement.getAttributes().keySet()) { List<ExtensionAttribute> otherAttributeList = otherElement.getAttributes().get(key); if (otherAttributeList != null && !otherAttributeList.isEmpty()) { List<ExtensionAttribute> attributeList = new ArrayList<>(); for (ExtensionAttribute extensionAttribute : otherAttributeList) { attributeList.add(extensionAttribute.clone()); } attributes.put(key, attributeList); } } } }
protected void createDiagramInterchangeInformation(BaseElement element, List<mxPoint> waypoints) { List<GraphicInfo> graphicInfoForWaypoints = new ArrayList<>(); 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); }
@Override public void parse(BpmnParse bpmnParse, BaseElement element) { super.parse(bpmnParse, element); createExecutionListenersOnScope(bpmnParse, ((FlowNode) element).getExecutionListeners(), findActivity(bpmnParse, element.getId())); }
@Override public void parse(BpmnParse bpmnParse, BaseElement element) { ActivityImpl activity = bpmnParse.getCurrentScope().findActivity(element.getId()); if (element instanceof BoundaryEvent) { // A boundary-event never receives an activity start-event activity.addExecutionListener(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_END, ACTIVITY_INSTANCE_START_LISTENER, 0); activity.addExecutionListener(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_END, ACTIVITI_INSTANCE_END_LISTENER, 1); } else { 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); } }
@Override protected void convertElementToJson(ObjectNode propertiesNode, BaseElement baseElement) { SubProcess subProcess = (SubProcess) baseElement; propertiesNode.put("activitytype", getStencilId(baseElement)); GraphicInfo gi = model.getGraphicInfo(baseElement.getId()); Boolean isExpanded = gi.getExpanded(); ArrayNode subProcessShapesArrayNode = objectMapper.createArrayNode(); GraphicInfo graphicInfo = model.getGraphicInfo(subProcess.getId()); if (isExpanded != null && isExpanded == false) { processor.processFlowElements(subProcess, model, subProcessShapesArrayNode, formKeyMap, decisionTableKeyMap, 0, 0); } else { processor.processFlowElements(subProcess, model, subProcessShapesArrayNode, formKeyMap, decisionTableKeyMap, graphicInfo.getX(), graphicInfo.getY()); } flowElementNode.set("childShapes", subProcessShapesArrayNode); if (subProcess instanceof Transaction) { propertiesNode.put("istransaction", true); } BpmnJsonConverterUtil.convertDataPropertiesToJson(subProcess.getDataObjects(), propertiesNode); }
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);