@Override public MessageFlow clone() { MessageFlow clone = new MessageFlow(); clone.setValues(this); return clone; }
public void setValues(MessageFlow otherFlow) { super.setValues(otherFlow); setName(otherFlow.getName()); setSourceRef(otherFlow.getSourceRef()); setTargetRef(otherFlow.getTargetRef()); setMessageRef(otherFlow.getMessageRef()); } }
xtw.writeAttribute(ATTRIBUTE_ID, messageFlow.getId()); if (StringUtils.isNotEmpty(messageFlow.getName())) { xtw.writeAttribute(ATTRIBUTE_NAME, messageFlow.getName()); if (StringUtils.isNotEmpty(messageFlow.getSourceRef())) { xtw.writeAttribute(ATTRIBUTE_FLOW_SOURCE_REF, messageFlow.getSourceRef()); if (StringUtils.isNotEmpty(messageFlow.getTargetRef())) { xtw.writeAttribute(ATTRIBUTE_FLOW_TARGET_REF, messageFlow.getTargetRef()); if (StringUtils.isNotEmpty(messageFlow.getMessageRef())) { xtw.writeAttribute(ATTRIBUTE_MESSAGE_REF, messageFlow.getMessageRef());
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); } } }
@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; } }
if (messageFlow.getSourceRef().equals(flowNode.getId())) { outgoingArrayNode.add(BpmnJsonConverterUtil.createResourceNode(messageFlow.getId()));
hasName = true; } else if (messageFlow != null && StringUtils.isNotEmpty(messageFlow.getName())) { hasName = true;
ObjectNode flowNode = BpmnJsonConverterUtil.createChildShape(messageFlow.getId(), STENCIL_MESSAGE_FLOW, 172, 212, 128, 212); ArrayNode dockersArrayNode = objectMapper.createArrayNode(); ObjectNode dockNode = objectMapper.createObjectNode(); dockNode.put(EDITOR_BOUNDS_X, model.getGraphicInfo(messageFlow.getSourceRef()).getWidth() / 2.0); dockNode.put(EDITOR_BOUNDS_Y, model.getGraphicInfo(messageFlow.getSourceRef()).getHeight() / 2.0); dockersArrayNode.add(dockNode); if (model.getFlowLocationGraphicInfo(messageFlow.getId()).size() > 2) { for (int i = 1; i < model.getFlowLocationGraphicInfo(messageFlow.getId()).size() - 1; i++) { GraphicInfo graphicInfo = model.getFlowLocationGraphicInfo(messageFlow.getId()).get(i); dockNode = objectMapper.createObjectNode(); dockNode.put(EDITOR_BOUNDS_X, graphicInfo.getX()); dockNode.put(EDITOR_BOUNDS_X, model.getGraphicInfo(messageFlow.getTargetRef()).getWidth() / 2.0); dockNode.put(EDITOR_BOUNDS_Y, model.getGraphicInfo(messageFlow.getTargetRef()).getHeight() / 2.0); dockersArrayNode.add(dockNode); flowNode.set("dockers", dockersArrayNode); ArrayNode outgoingArrayNode = objectMapper.createArrayNode(); outgoingArrayNode.add(BpmnJsonConverterUtil.createResourceNode(messageFlow.getTargetRef())); flowNode.set("outgoing", outgoingArrayNode); flowNode.set("target", BpmnJsonConverterUtil.createResourceNode(messageFlow.getTargetRef())); propertiesNode.put(PROPERTY_OVERRIDE_ID, messageFlow.getId()); if (StringUtils.isNotEmpty(messageFlow.getName())) { propertiesNode.put(PROPERTY_NAME, messageFlow.getName());
if (messageFlow.getSourceRef().equals(pool.getId())) { outgoingArrayNode.add(BpmnJsonConverterUtil.createResourceNode(messageFlow.getId()));
public void setValues(MessageFlow otherFlow) { super.setValues(otherFlow); setName(otherFlow.getName()); setSourceRef(otherFlow.getSourceRef()); setTargetRef(otherFlow.getTargetRef()); setMessageRef(otherFlow.getMessageRef()); } }
@Override public MessageFlow clone() { MessageFlow clone = new MessageFlow(); clone.setValues(this); return clone; }