public Warning(String warningMessage, BaseElement element) { this.warningMessage = warningMessage; this.resource = element.getId(); line = element.getXmlRowNumber(); 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(FormValue otherValue) { super.setValues(otherValue); setName(otherValue.getName()); } }
@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; } }
protected void addError(List<ValidationError> validationErrors, String problem, Process process, BaseElement baseElement, String description, boolean isWarning) { ValidationError error = new ValidationError(); error.setWarning(isWarning); if (process != null) { error.setProcessDefinitionId(process.getId()); error.setProcessDefinitionName(process.getName()); } if (baseElement != null) { error.setXmlLineNumber(baseElement.getXmlRowNumber()); error.setXmlColumnNumber(baseElement.getXmlColumnNumber()); } error.setProblem(problem); error.setDefaultDescription(description); if (baseElement instanceof FlowElement) { FlowElement flowElement = (FlowElement) baseElement; error.setActivityId(flowElement.getId()); error.setActivityName(flowElement.getName()); } addError(validationErrors, error); }
public static boolean writeExtensionElements(BaseElement baseElement, boolean didWriteExtensionStartElement, Map<String, String> namespaceMap, XMLStreamWriter xtw) throws Exception { if (!baseElement.getExtensionElements().isEmpty()) { if (!didWriteExtensionStartElement) { xtw.writeStartElement(ELEMENT_EXTENSIONS); didWriteExtensionStartElement = true; } if (namespaceMap == null) { namespaceMap = new HashMap<>(); } for (List<ExtensionElement> extensionElements : baseElement.getExtensionElements().values()) { for (ExtensionElement extensionElement : extensionElements) { writeExtensionElement(extensionElement, namespaceMap, xtw); } } } return didWriteExtensionStartElement; }
baseElement.setId(BpmnJsonConverterUtil.getElementId(elementNode));
@Override public String getAttributeValue(String namespace, String name) { List<ExtensionAttribute> attributes = getAttributes().get(name); if (attributes != null && !attributes.isEmpty()) { for (ExtensionAttribute attribute : attributes) { if ((namespace == null && attribute.getNamespace() == null) || namespace.equals(attribute.getNamespace())) return attribute.getValue(); } } return null; }
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); } } }
@Override public String getAttributeValue(String namespace, String name) { List<ExtensionAttribute> attributes = getAttributes().get(name); if (attributes != null && !attributes.isEmpty()) { for (ExtensionAttribute attribute : attributes) { if ((namespace == null && attribute.getNamespace() == null) || namespace.equals(attribute.getNamespace())) return attribute.getValue(); } } return null; }
public Warning(String warningMessage, BaseElement element) { this.warningMessage = warningMessage; this.resource = element.getId(); line = element.getXmlRowNumber(); 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 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 setValues(FormValue otherValue) { super.setValues(otherValue); setName(otherValue.getName()); } }
public Problem(String errorMessage, BaseElement element) { this.errorMessage = errorMessage; this.resource = element.getId(); this.line = element.getXmlRowNumber(); this.column = element.getXmlColumnNumber(); }
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); }
public void setValues(Lane otherElement) { super.setValues(otherElement); setName(otherElement.getName()); setParentProcess(otherElement.getParentProcess()); flowReferences = new ArrayList<>(); if (otherElement.getFlowReferences() != null && !otherElement.getFlowReferences().isEmpty()) { flowReferences.addAll(otherElement.getFlowReferences()); } } }
public Problem(String errorMessage, BaseElement element) { this.errorMessage = errorMessage; this.resource = element.getId(); this.line = element.getXmlRowNumber(); this.column = element.getXmlColumnNumber(); }
@Override public void parse(BpmnParse bpmnParse, BaseElement element) { super.parse(bpmnParse, element); createExecutionListenersOnScope(bpmnParse, ((FlowNode) element).getExecutionListeners(), findActivity(bpmnParse, element.getId())); }
public void setValues(Lane otherElement) { super.setValues(otherElement); setName(otherElement.getName()); setParentProcess(otherElement.getParentProcess()); flowReferences = new ArrayList<>(); if (otherElement.getFlowReferences() != null && !otherElement.getFlowReferences().isEmpty()) { flowReferences.addAll(otherElement.getFlowReferences()); } } }