In SystemWeaver, sequence diagrams are configured using the configurable graph config item. With a valid sequence diagram configuration in place, users can visualize and edit object interactions arranged in the sequence. This article describes the Sequence Diagram model, and provides a configuration example.
Prerequisites
- Familiarity with SystemWeaver concepts such as Items, Parts and Attributes
- Knowledge of XML
- Configuring Graphs
- Assignment of the SW Architect role in the server
- An installation of the SystemWeaver Explorer client (swExplorer)
- Configurable Graph meta data is installed
Example Required Meta Model
The below illustration shows the basic meta model supporting the Sequence Diagram graph.

Item Types
| Icon | Name | SID |
|---|---|---|
| Abstract Diagram | SI0415 | |
![]() | Abstract Sequence Diagram | SI0343 |
![]() | Abstract Connection Point | SI0349 |
![]() | Abstract Open Connection Point(s) | SI0350 |
![]() | Gate | SI0347 |
![]() | Lifeline | SI0342 |
![]() | Sequence Diagram | SI0351 |
![]() | Endpoint | SI0346 |
![]() | Abstract Fragment | SI0352 |
![]() | Fragment | SI0344 |
![]() | Frame | SI0345 |
![]() | Message | SI0345 |
Part Types
| Icon | Name | SID |
|---|---|---|
| Sequence Diagram(s) | SP0568 | |
| Diagram Object(s) | SP0485 | |
| Message(s) | SP0486 | |
| Fragment(s) | SP0487 | |
![]() | From | SP0483 |
![]() | To | SP0484 |
| Frame(s) | SP0489 | |
| Referenced Sequence Diagram | SP0488 |
Attribute Types
| Name | SID | Type | Dimension | Values | Related Item Type |
| Time Unit | SA0092 | Enumeration | Single | s, ms, us | SI0351 |
| Fragment Type | SA0804 | Enumeration | Single | Alternative, If, Loop, Negation, Paralell, Region | SI0344 |
| Kind | SA0807 | Enumeration | Single | Call, Signal | SI0348 |
| Return message | SA0089 | Boolean | Single | SI0348 | |
| Synch | SA0806 | Enumeration | Single | Synchronous, Asynchronous | SI0348 |
Configuring the View
A sequence diagram is defined using a configurable graph. The graph is a Config item and is created using the config item Sandbox mode as described in Creating Config Item Views. By default, the Sandbox will include a few basic elements of a configuration to get you started, as shown below.

| Tip: A quick way to create a new sequence diagram is to copy a similar one that is already defined as described in Creating a New Config Item by Copying an Existing. |
Explanation of the Configuration Elements
A Sequence Diagram is configured within a <Graph> and all Graph options apply. For the configuration elements specific to Sequence Diagram, see the Script Language Reference Manual in the application Help.

Example Sequence Diagram
Example Data

Example Configuration
<Graph>
<Mappings>
<MappingItem id="1" leftCaption="Send Message ? " rightCaption="Receive Message ? " distinctMappingPerPair="true" multipleDistinctMappingPerPair="true">
<PathFromMainToMappingContainer select="."/>
<MappingItem itemType="SI0348" partType="SP0486"/>
<LeftMapping itemType="SI0350" partType="SP0483"/>
<RightMapping itemType="SI0349" partType="SP0484"/>
</MappingItem>
</Mappings>
<NodeStyles>
<NodeStyle name="LifeLine" fillColor="#ffffff" fillColor2="#ffffff">
<Shape>
<Rectangle/>
<!--Rectangle width="120" height="80"/-->
</Shape>
</NodeStyle>
<NodeStyle name="Boundary" fillColor="#ffffff" fillColor2="#ffffff">
<Shape>
<Boundary/>
<!--Boundary width="100" height="100"/-->
</Shape>
</NodeStyle>
<NodeStyle name="Control" fillColor="#ffffff" fillColor2="#ffffff">
<Shape>
<Control/>
<!--Control width="100" height="100"/-->
</Shape>
</NodeStyle>
<NodeStyle name="Entity" fillColor="#ffffff" fillColor2="#ffffff">
<Shape>
<Entity/>
<!--Entity width="100" height="100"/-->
</Shape>
</NodeStyle>
<NodeStyle name="Actor" fillColor="#ffffff" fillColor2="#ffffff">
<Shape>
<Actor/>
<!--Actor width="50" height="100"/-->
</Shape>
</NodeStyle>
<NodeStyle name="Gate" fillColor="#ffff00" fillColor2="#ffffff">
<Shape>
<Rectangle width="40" height="40"/>
</Shape>
</NodeStyle>
<NodeStyle name="EndPoint" fillColor="#000000" fillColor2="#000000">
<Shape>
<Circle diameter="40"/>
</Shape>
</NodeStyle>
<NodeStyle name="Ref" fillColor="#87cefa" fillColor2="#ffffff">
<Shape>
<Package/>
</Shape>
</NodeStyle>
</NodeStyles>
<EdgeStyles>
<EdgeStyle name="Message" color="#000000" thickness="1" lineType="solid" fromArrowType="none" toArrowType="default"/>
<EdgeStyle name="ReturnMessage" color="#000000" thickness="2" lineType="dash" fromArrowType="none" toArrowType="default"/>
<EdgeStyle name="LifeLineEdge" color="#000000" thickness="1" lineType="dash"/>
</EdgeStyles>
<SequenceDiagram>
<AddPart owner="." partType="SP0485"/>
<AddPart owner="." partType="SP0487"/>
<AddPart owner="." partType="SP0488"/>
<ForEach select="/part::SP0485.OrderBy(PartNo)">
<Variable name="currentPart" as="Part" select="."/>
<DefObj>
<Choose>
<!--Gate-->
<When test="SID='SI0347'">
<Gate>
<RemovePart part="$currentPart" caption="Remove #{? /defobj::.Join('')}"/>
</Gate>
</When>
<!--EndPoint-->
<When test="SID='SI0346'">
<Endpoint>
<RemovePart part="$currentPart" caption="Remove #{? /defobj::.Join('')}"/>
</Endpoint>
</When>
<!--Actor-->
<When test="@SA0803 = 'Actor'">
<Lifeline headStyle="Actor" lineStyle="LifeLineEdge">
<RemovePart part="$currentPart" caption="Remove #{? /defobj::.Join('')}"/>
</Lifeline>
</When>
<!--Lifeline -->
<When test="@SA0803 = 'Lifeline'">
<Lifeline headStyle="LifeLine" lineStyle="LifeLineEdge">
<RemovePart part="$currentPart" caption="Remove #{? /defobj::.Join('')}"/>
</Lifeline>
</When>
<!--Boundary-->
<When test="@SA0803 = 'Boundary'">
<Lifeline headStyle="Boundary" lineStyle="LifeLineEdge">
<RemovePart part="$currentPart" caption="Remove #{? /defobj::.Join('')}"/>
</Lifeline>
</When>
<!--Control-->
<When test="@SA0803 = 'Control'">
<Lifeline headStyle="Control" lineStyle="LifeLineEdge">
<RemovePart part="$currentPart" caption="Remove #{? /defobj::.Join('')}"/>
</Lifeline>
</When>
<!--Entity-->
<When test="@SA0803 = 'Entity'">
<Lifeline headStyle="Entity" lineStyle="LifeLineEdge">
<RemovePart part="$currentPart" caption="Remove #{? /defobj::.Join('')}"/>
</Lifeline>
</When>
<Otherwise>
<Lifeline headStyle="LifeLine" lineStyle="LifeLineEdge">
<RemovePart part="$currentPart" caption="Remove #{? /defobj::.Join('')}"/>
</Lifeline>
</Otherwise>
</Choose>
</DefObj>
</ForEach>
<ForEach select="/part::SP0486.OrderBy(PartNo)">
<Variable name="part" select="." as="Part"/>
<DefObj>
<Message from="/SP0483" to="/SP0484" style="#{? if @SA0089 = true then 'ReturnMessage' else 'Message'}">
<RemovePart part="$part" caption="Remove Message"/>
</Message>
</DefObj>
</ForEach>
<ForEach select="/part::SP0487">
<Fragment caption="#{Name} ">
<RemovePart part="." caption="Remove Fragment"/>
<DefObj>
<AddPart owner="." partType="SP0489"/>
<RemovePart part="/part::SP0489" caption="Remove (->) #{Name}"/>
<ForEach select="/part::SP0489">
<Variable name="frame" select="." as="Part"/>
<DefObj>
<AddPart owner="." partType="SP0490" caption="Add a message to #{Name}" pathToOwner="[$frame]"/>
</DefObj>
</ForEach>
<ForEach select="/SP0489">
<AddPart owner="." partType="SP0491" caption="Nested Fragment to #{Name}"/>
</ForEach>
<ForEach select="/PIFFS union /PELSE union /PSDLF union /SP0489 union /PSDNF union /PSDPF union /PSDRFF union /PSDRF">
<Frame caption="#{Name}">
<ForEach select="/part::SP0490">
<MessageRef id="/defobj::"/>
</ForEach>
</Frame>
</ForEach>
</DefObj>
</Fragment>
</ForEach>
<ForEach select="/SP0488">
<Endpoint style="Ref"/>
</ForEach>
</SequenceDiagram>
</Graph>Example Result













