org.flowable.bpmn.model.Association.setTargetRef()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.flowable.bpmn.model.Association.setTargetRef()方法的一些代码示例,展示了Association.setTargetRef()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Association.setTargetRef()方法的具体详情如下:
包路径:org.flowable.bpmn.model.Association
类名称:Association
方法名:setTargetRef

Association.setTargetRef介绍

暂无

代码示例

代码示例来源:origin: org.flowable/flowable-json-converter

@Override
  protected BaseElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    Association association = new Association();

    String sourceRef = BpmnJsonConverterUtil.lookForSourceRef(elementNode.get(EDITOR_SHAPE_ID).asText(), modelNode.get(EDITOR_CHILD_SHAPES));

    if (sourceRef != null) {
      association.setSourceRef(sourceRef);
      String targetId = elementNode.get("target").get(EDITOR_SHAPE_ID).asText();
      association.setTargetRef(BpmnJsonConverterUtil.getElementId(shapeMap.get(targetId)));
    }

    return association;
  }
}

代码示例来源:origin: org.flowable/flowable-bpmn-converter

@Override
protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception {
  Association association = new Association();
  BpmnXMLUtil.addXMLLocation(association, xtr);
  association.setSourceRef(xtr.getAttributeValue(null, ATTRIBUTE_FLOW_SOURCE_REF));
  association.setTargetRef(xtr.getAttributeValue(null, ATTRIBUTE_FLOW_TARGET_REF));
  association.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID));
  String associationDirectionString = xtr.getAttributeValue(null, ATTRIBUTE_ASSOCIATION_DIRECTION);
  if (StringUtils.isNotEmpty(associationDirectionString)) {
    AssociationDirection associationDirection = AssociationDirection.valueOf(associationDirectionString.toUpperCase());
    association.setAssociationDirection(associationDirection);
  }
  parseChildElements(getXMLElementName(), association, model, xtr);
  return association;
}

代码示例来源:origin: org.ow2.petals.flowable/flowable-bpmn-model

public void setValues(Association otherElement) {
    super.setValues(otherElement);
    setSourceRef(otherElement.getSourceRef());
    setTargetRef(otherElement.getTargetRef());

    if (otherElement.getAssociationDirection() != null) {
      setAssociationDirection(otherElement.getAssociationDirection());
    }
  }
}

代码示例来源:origin: org.flowable/flowable-bpmn-model

public void setValues(Association otherElement) {
    super.setValues(otherElement);
    setSourceRef(otherElement.getSourceRef());
    setTargetRef(otherElement.getTargetRef());

    if (otherElement.getAssociationDirection() != null) {
      setAssociationDirection(otherElement.getAssociationDirection());
    }
  }
}

相关文章