use of org.activiti.bpmn.model.AssociationDirection in project Activiti by Activiti.
the class AssociationXMLConverter method writeAdditionalAttributes.
@Override
protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception {
Association association = (Association) element;
writeDefaultAttribute(ATTRIBUTE_FLOW_SOURCE_REF, association.getSourceRef(), xtw);
writeDefaultAttribute(ATTRIBUTE_FLOW_TARGET_REF, association.getTargetRef(), xtw);
AssociationDirection associationDirection = association.getAssociationDirection();
if (associationDirection != null) {
writeDefaultAttribute(ATTRIBUTE_ASSOCIATION_DIRECTION, associationDirection.getValue(), xtw);
}
}
use of org.activiti.bpmn.model.AssociationDirection in project Activiti by Activiti.
the class AssociationXMLConverter method convertXMLToElement.
@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 asociationDirectionString = xtr.getAttributeValue(null, ATTRIBUTE_ASSOCIATION_DIRECTION);
if (StringUtils.isNotEmpty(asociationDirectionString)) {
AssociationDirection associationDirection = AssociationDirection.valueOf(asociationDirectionString.toUpperCase());
association.setAssociationDirection(associationDirection);
}
parseChildElements(getXMLElementName(), association, model, xtr);
return association;
}
Aggregations