Representing Graphical Connections
ArchiMate Connections
In order to represent a graphical connection instance of an ArchiMate relationship in XML, a <connection>
tag is created with a relationshipRef
attribute referencing an ArchiMate relationship that is declared elsewhere in the XML document.
For example:
-
Declare two
<element>
tags within the<elements>
tag:<element identifier="id-123" xsi:type="BusinessActor"> <name xml:lang="en">Customer</name> </element> <element identifier="id-124" xsi:type="BusinessRole"> <name xml:lang="en">Customer Role</name> </element>
-
Declare a
<relationship>
tag within the<relationships>
tag that references these two elements as source and target elements:<relationship identifier="id-125" source="id-123" target="id-124" xsi:type="Assignment" />
-
Declare two
<node>
tags within a parent<node>
tag, or a parent<view>
tag. TheelementRef
attributes should have the same values as theidentifier
attribute of the referenced elements declared above. Ensure that thexsi:type
attributes have the value “Element”:<node identifier="id-3732" elementRef="id-123" xsi:type="Element" x="610" y="360" w="150" h="120"> <style> <fillColor r="255" g="255" b="181" a="100" /> <lineColor r="92" g="92" b="92" /> <font name="Segoe UI" size="9"> <color r="0" g="0" b="0" /> </font> </style> </node> <node identifier="id-3733" elementRef="id-124" xsi:type="Element" x="810" y="380" w="150" h="120"> <style> <fillColor r="255" g="255" b="181" a="100" /> <lineColor r="92" g="92" b="92" /> <font name="Segoe UI" size="9"> <color r="0" g="0" b="0" /> </font> </style> </node>
-
Declare a
<connection>
tag within a parent<view>
tag. TherelationshipRef
attribute should have the same value as theidentifier
attribute of the referenced relationship. Thesource
attribute should have the same value as theidentifier
attribute of the referenced source<node>
and thetarget
attribute should have the same value as theidentifier
attribute of the referenced target<node>
. Ensure that thexsi:type
attribute has the value “Relationship”:<connection identifier="id-145" relationshipRef="id-125" xsi:type="Relationship" source="id-3732" target="3733"> <style> <lineColor r="0" g="0" b="0" /> <font name="Segoe UI" size="9"> <color r="0" g="0" b="0" /> </font> </style> </connection>
Representing Other Types of Graphical Connections
In order to represent a graphical connection that does not reference an ArchiMate relationship, such as a plain line, a <connection>
tag is created without a reference to an ArchiMate relationship.
For example, to represent a line that connects a label node to another node:
Declare a <connection>
tag within a parent <view>
tag. Ensure that the xsi:type
attribute has the value “Line”:
<connection identifier="id-1234" xsi:type="Line" source="id-9876" target="id-8654">
<style>
<lineColor r="0" g="0" b="0" />
<font name="Segoe UI" size="9">
<color r="0" g="0" b="0" />
</font>
</style>
</connection>