@Override protected BaseElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) { MessageFlow flow = new MessageFlow(); String sourceRef = BpmnJsonConverterUtil.lookForSourceRef(elementNode.get(EDITOR_SHAPE_ID).asText(), modelNode.get(EDITOR_CHILD_SHAPES)); if (sourceRef != null) { flow.setSourceRef(sourceRef); JsonNode targetNode = elementNode.get("target"); if (targetNode != null && !targetNode.isNull()) { String targetId = targetNode.get(EDITOR_SHAPE_ID).asText(); if (shapeMap.get(targetId) != null) { flow.setTargetRef(BpmnJsonConverterUtil.getElementId(shapeMap.get(targetId))); } } } return flow; } }
public void parse(XMLStreamReader xtr, BpmnModel model) throws Exception { String id = xtr.getAttributeValue(null, ATTRIBUTE_ID); if (StringUtils.isNotEmpty(id)) { MessageFlow messageFlow = new MessageFlow(); messageFlow.setId(id); String name = xtr.getAttributeValue(null, ATTRIBUTE_NAME); if (StringUtils.isNotEmpty(name)) { messageFlow.setName(name); } String sourceRef = xtr.getAttributeValue(null, ATTRIBUTE_FLOW_SOURCE_REF); if (StringUtils.isNotEmpty(sourceRef)) { messageFlow.setSourceRef(sourceRef); } String targetRef = xtr.getAttributeValue(null, ATTRIBUTE_FLOW_TARGET_REF); if (StringUtils.isNotEmpty(targetRef)) { messageFlow.setTargetRef(targetRef); } String messageRef = xtr.getAttributeValue(null, ATTRIBUTE_MESSAGE_REF); if (StringUtils.isNotEmpty(messageRef)) { messageFlow.setMessageRef(messageRef); } model.addMessageFlow(messageFlow); } } }
public void setValues(MessageFlow otherFlow) { super.setValues(otherFlow); setName(otherFlow.getName()); setSourceRef(otherFlow.getSourceRef()); setTargetRef(otherFlow.getTargetRef()); setMessageRef(otherFlow.getMessageRef()); } }
public void setValues(MessageFlow otherFlow) { super.setValues(otherFlow); setName(otherFlow.getName()); setSourceRef(otherFlow.getSourceRef()); setTargetRef(otherFlow.getTargetRef()); setMessageRef(otherFlow.getMessageRef()); } }