This article includes an example of a configurable graph config item definition that includes an implicit connection (in-out port). The connection type mimics that of the SWExtension.ComponentGraph. The two connected items point to the same port, but with different part types.
Example Data
Example Configuration
<Graph> <Options> <ObjIcons/> </Options> <Mappings> <MappingImplicit id="2" caption="Connect Ports"> <OutPort partType="ARPP"/> <InPort partType="ARRP"/> </MappingImplicit> </Mappings> <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="ARCW" part="SwComponents" defobj="+SwComponent"/> <AddParts owner="SwComponent" sid="ARPP" part="SendSignal" defobj="+Port"/> <AddParts owner="SwComponent" sid="ARRP" part="ReceiveSignal" defobj="+Port"/> <AddParts owner="DesignFunction" sid="ARPP" part="SendSignal" defobj="+Port"/> <AddParts owner="DesignFunction" sid="ARRP" part="ReceiveSignal" defobj="+Port"/> </Context> <ForEachInContext name="Vehical" group="DesignFunction"> <Node> <AddPart owner="." partType="ITFC"/> <AddPart owner="." partType="ARRP"/> <AddPart owner="." partType="ARPP"/> <ForEach select="Context:/part::SwComponents"> <Variable name="currentPart" as="Part" select="."/> <ForEach select="Context:/defobj::"> <Node> <!--RemovePart part="$currentPart"/--> <AddPart owner="." partType="ARRP"/> <AddPart owner="." partType="ARPP"/> <ForEach select="Context:/part::SendSignal"> <OutPort connection="DefObj"> <RemovePart part="." caption="Remove Send Signals"/> </OutPort> </ForEach> <ForEach select="Context:/part::ReceiveSignal"> <InPort connection="DefObj"> <RemovePart part="." caption="Remove Receive Signals"/> </InPort> </ForEach> </Node> </ForEach> </ForEach> <ForEach select="Context:/SendSignal"> <OutPort connection="."> <RemovePart part="." caption="Remove Send Signals"/> </OutPort> </ForEach> <ForEach select="Context:/part::ReceiveSignal"> <InPort connection="DefObj"> <RemovePart part="." caption="Remove Receive Signals"/> </InPort> </ForEach> </Node> </ForEachInContext> </Graph>
<MappingImplicit> has two required attributes.
id identifies the mapping configuration. It is a string value that must be unique within a graph.
caption is the connect option caption text.
<OutPort> defines the OutPort part to be connected. The partType attribute must provide the part type SID.
<InPort> defines the InPort part to be connected. The partType attribute must provide the part type SID.
Example Result
When selecting a port and a component to connect the port to, the configured connection options will be available. This enables users to work graphically directly in the view.