This article includes an example of a configurable graph config item definition that includes an explicit connection. With this type of connection, you have to define which of the two items is the "owner" and which is the DefObj (pointed to) to tell which direction the connection goes. 




Example Data

Example Configuration

<Graph>
	<Options>
		<Legend/>
	</Options>
	<Mappings>
		<MappingItemToItem id="1" ownerCaption="Connect selected UCs to primary actors" defObjCaption="Connect selected use cases to primary actors">
			<Part partType="IPAC"/>
		</MappingItemToItem>
		<MappingItemToItem id="2" ownerCaption="Connect selected UCs to secondary actors" defObjCaption="Connect selected use cases to secondary actors">
			<Part partType="ISAC"/>
		</MappingItemToItem>
		<MappingItemToItem id="3" ownerCaption="Includes other selected UCs" defObjCaption="Is included in other selected UCs">
			<Part partType="IIUC"/>
		</MappingItemToItem>
		<MappingItemToItem id="4" ownerCaption="Extend other selected UCs" defObjCaption="Is Extended in other selected UCs ">
			<Part partType="IEUC"/>
		</MappingItemToItem>
	</Mappings>
	<NodeStyles>
		<NodeStyle name="useCaseStyle" fillColor="#ffffff" borderThickness="1" legendLabel="Use Case">
			<Shape>
				<Ellipse/>
			</Shape>
		</NodeStyle>
		<NodeStyle name="actorStyle" borderThickness="1" legendLabel="Actor">
			<Shape>
				<Actor/>
			</Shape>
		</NodeStyle>
		<NodeStyle name="Function" fillColor="#f0f0ff" fillColor2="#ffffff" borderThickness="2" borderColor="#000000" legendLabel="Use Case Diagram"/>
	</NodeStyles>
	<EdgeStyles>
		<EdgeStyle name="Include" color="#000000" thickness="1" lineType="dash" fromArrowType="none" toArrowType="default" legendLabel="Include Use Case"/>
		<EdgeStyle name="Extend" color="#000000" thickness="1" lineType="dash" fromArrowType="none" toArrowType="default" legendLabel="Extend Use Case"/>
		<EdgeStyle name="Actor" color="#000000" thickness="1" lineType="solid" fromArrowType="none" toArrowType="none" legendLabel="Primary/Secondary Actor"/>
	</EdgeStyles>
	<Context name="Vehical">
		<AddParts owner="main" sid="FUPA" part="Functions" defobj="Function"/>
		<AddParts owner="Function" sid="REDC" part="FunctionContainers" defobj="FunctionContainer"/>
		<AddParts owner="FunctionContainer" sid="IBRA" part="LeftRequirements" defobj="LeftRequirement"/>
		<AddParts owner="FunctionContainer" sid="3SBH" part="LeftRequirements" defobj="+LeftRequirement"/>
		<AddParts owner="FunctionContainer" sid="FUAN" part="FunAnchors" defobj="+Anchor"/>
		<AddParts owner="main" sid="DEPA" part="Designs" defobj="Design"/>
		<AddParts owner="Design" sid="DEDS" part="DesignContainers" defobj="DesignContainer"/>
		<AddParts owner="DesignContainer" sid="IXRQ" part="RightRequirements" defobj="RightRequirement"/>
		<AddParts owner="DesignContainer" sid="IXRR" part="RightRequirements" defobj="+RightRequirement"/>
		<AddParts owner="DesignContainer" sid="SYAN" part="SysAnchors" defobj="+Anchor"/>
		<AddParts owner="Design" sid="AIML" part="MappingItemContainers" defobj="MappingItemContainer"/>
		<AddParts owner="MappingItemContainer" sid="IRMM" part="MappingItems" defobj="MappingItem"/>
		<AddParts owner="MappingItem" sid="EXRE" part="MappingItemLeftReq" defobj="+LeftRequirement"/>
		<AddParts owner="MappingItem" sid="INRX" part="MappingItemRightReq" defobj="+RightRequirement"/>
		<AddParts owner="main" sid="DEFU" part="DesignFunctions" defobj="DesignFunction"/>
		<AddParts owner="DesignFunction" sid="ITFC" part="SwComponents" defobj="SwComponent"/>
		<AddParts owner="SwComponent" sid="ARPP" part="SendSignal" defobj="Port"/>
		<AddParts owner="SwComponent" sid="ARRP" part="ReceiveSignal" defobj="+Port"/>
		<AddParts owner="main" sid="UCDI" part="UCs" defobj="UCD"/>
		<AddParts owner="UCD" sid="USCA" part="UCs" defobj="+UC"/>
		<AddParts owner="UC" sid="IPAC" part="primary" defobj="+actor"/>
		<AddParts owner="UC" sid="ISAC" part="secondary" defobj="+actor"/>
		<AddParts owner="UC" sid="IIUC" part="includedUC" defobj="+UC"/>
		<AddParts owner="UC" sid="IEUC" part="extendedUC" defobj="+UC"/>
		<AddParts owner="UCD" sid="ACTO" part="Actors" defobj="+actor"/>
	</Context>
	<ForEachInContext name="Vehical" group="UCD">
		<AddPart owner="." partType="USCA"/>
		<AddPart owner="." partType="ACTO"/>
		<Node>
			<AddPart owner="." partType="USCA"/>
			<AddPart owner="." partType="ACTO"/>
			<ForEach select="Context:/UCs">
				<Node style="useCaseStyle">
					<ForEach select="Context:/back-to-part::UCs">
						<RemovePart part="." caption="Remove from #{? Owner}"/>
					</ForEach>
					<ForEach select="Context:/back-to-part::includedUC">
						<RemovePart part="." caption="Exclude from #{? Owner}"/>
					</ForEach>
					<ForEach select="Context:/back-to-part::extendedUC">
						<RemovePart part="." caption="Unextend from #{? Owner}"/>
					</ForEach>
				</Node>
			</ForEach>
		</Node>
		<ForEach select="Context:/Actors">
			<Node style="actorStyle">
				<ForEach select="Context:/back-to-part::primary">
					<RemovePart part="." caption="Remove primary from #{? Owner}"/>
				</ForEach>
				<ForEach select="Context:/back-to-part::secondary">
					<RemovePart part="." caption="Remove secondary from #{? Owner}"/>
				</ForEach>
				<ForEach select="Context:/back-to-part::Actors">
					<RemovePart part="." caption="Remove actor from #{? Owner}"/>
				</ForEach>
			</Node>
		</ForEach>
	</ForEachInContext>
	<ForEachInContext name="Vehical" group="UC">
		<Edge to="." from="Context:/primary" style="Actor" caption="'&lt;&lt;Primary &gt;&gt;'"/>
		<Edge to="." from="Context:/secondary" style="Actor" caption="'&lt;&lt;Secondary &gt;&gt;'"/>
		<Edge from="." to="Context:/includedUC" style="Include" caption="'&lt;&lt; Included UC &gt;&gt;'"/>
		<Edge from="." to="Context:/extendedUC" style="Extend" caption="'&lt;&lt; Extended UC &gt;&gt;'"/>
	</ForEachInContext>
</Graph>
XML

<MappingItemToItem> has three required attributes. 

id identifies the mapping configuration. It is a string value that must be unique within a graph.

ownerCaption is the item that owns the part being added. 

defObjCaption is the defObj of the part to be added. This handles the case where the two items are of the same item type. 


<Part> defines the part to be connected. The partType attribute must provide the part type SID.


Example Result

When selecting two or more nodes to be connected, the configured connection options will be available for the selected nodes. This enables users to work graphically directly in the view.