The RM Plus Light view can be configured to support specific use cases such as requirements traceability. 


Prerequisites

  • Familiarity with SystemWeaver concepts such as Items, Parts and Attributes
  • Knowledge of XML
  • An installation of the SystemWeaver swExplorer client (swExplorer)
  • Assignment of the SW Architect role in the server

Configuring the View

  1. File > Configure the explorer
  2. Item views tab, select RM Plus Light.


  3. View example XML and copy the script (also shown below) as a starting point for your configuration. 
  4. Click Edit configuration and paste the script in the Edit XML window. (If there are existing <Config> sections there, just add this new config below them within the <Configs> tag.) 
  5. Modify the configuration to meet the needs of the use case. (See the explanation of available elements below.)
  6. When you are ready to test and make it available to users, check the Active box. Users must log out and back in to see the new option.


Example Meta Model 

Below is an example meta model. It includes requirement containers so users can structure the requirements: 


Example Configuration

The example XML provided below can be found in View example XML in Configure the explorer:

<RequirementsViews>
   <RequirementsView id="PartReq">
        <ViewSettings>
            <Caption>Attribute trace</Caption>
            <RibbonGroup>Part attributes</RibbonGroup>
            <Description>This view supports creating requirements for parts</Description>
            <Image guiImage="94"/>
        </ViewSettings>
        <DescriptionWidth>500</DescriptionWidth>
        <ContextItemType>9FGR</ContextItemType>
        <RequirementContainerItemType>7PRC</RequirementContainerItemType>
        <RequirementItemType>9PRQ</RequirementItemType>
        <RequirementsPartType>9IPQ</RequirementsPartType>
        <BaselineItemType>9VLE</BaselineItemType>
        <PathToBaseline>9IBL;9IPS</PathToBaseline>
        <SidsToFollow>9ISS;9IPR;7IRQ;7ISR;9RTQ</SidsToFollow>
        <TracedItemType>9ARQ</TracedItemType>
        <TraceabilityPartType>9RTQ</TraceabilityPartType>
        <AdditionalAttributeColumnSids>2RQID;2abvf</AdditionalAttributeColumnSids>
        <PathToContextRequirements>/9ISS*/9IAP[SID='9ARQ']</PathToContextRequirements>  
        <AddGridXML>
          <Grid>
            <Options>
                <Grouping groupBy="3"/>
            </Options>
            <Parameters>
                <Parameter caption="xxx" name="pBaseline" hintContextPath="9IBL;9IPS">
                    <Values>
                        <ForEachPathReference path="9IBL;9IPS">
                            <AddValue/>
                        </ForEachPathReference>
                    </Values>
                </Parameter>
                <Parameter caption="xxx" name="pSelected" >
                    <Values>
                       <AddValue/>
                    </Values>
                </Parameter>
            </Parameters>            
            <Variable name="alreadyTraced" select="/9ISS*/9IPR*/9IFS*/7IRQ/7ISR*/part::9RTQ[/refobj::/defobj:: in $pSelected]/defobj::" as="Items"/>            
                <Context name="x" ignoreVersion="True">        
                    <AddParts owner="main" sid="9IAP" part="RelAttrReqs" defobj="AttrReq"/>
                    <AddParts owner="main" sid="9ISS" part="SSs" defobj="SS"/>
                    <AddParts owner="SS" sid="9IAP" part="SSRelAttrReqs" defobj="+AttrReq"/>
                    <AddParts owner="pBaseline" sid="9IAL" part="AttrLevels" defobj="AttrLevel"/>
                    <AddParts owner="AttrLevel" sid="9IAA" part="AttrAreas" defobj="AttrArea"/>
                    <AddParts owner="AttrArea" sid="9IAT" part="Attrs" defobj="Attr"/>
                    <AddParts owner="Attr" sid="9IAR" part="AttrReqs" defobj="AttrReq"/>
                </Context>
              <Columns>
                <ItemNameColumn caption="Requirement" width="300" objectName="Req"/>
                <AttributeColumn type="AUID" caption="ID" width="200" objectName="Req"/>
                <ItemNameColumn caption="Attribute" width="200" objectName="Attr"/>
              </Columns>
              <ForEachInContext name="x" group="AttrReq">
                <RowObject name="Req">  
                <If test="not AncestorHandle in $alreadyTraced.Select(AncestorHandle)">
                <Row>
                    <ForEach select="Context:/back::AttrReqs">
                        <RowObject name="Attr"/>
                    </ForEach>
                </Row>
                </If>
                </RowObject>
              </ForEachInContext>              
            </Grid>
        </AddGridXML>
    </RequirementsView>
</RequirementsViews>


X

Explanation of the Configuration Elements

The id attribute for each <RequirementsView> must be a string and unique within the configuration.


The <ViewSettings> tags define the appearance of the option in the ribbon. See View settings for multi-instance views.


<ContextItemType> is the SID of the element that represents what the requirements should describe and the view will be active for. For example: 


 <ContextItemType>9FGR</ContextItemType>


The next part creates relations between items: 


<RequirementContainerItemType> is the SID of the element owning the requirements. 


<RequirementItemType> is the SID of the requirement type.


<RequirementsPartType> is the SID of the part type from RequirementContainerItemType to RequirementItemType.


<BaselineItemType> is the SID of the element representing the baseline.


<PathToBaseline> contains the SIDs to follow from the Context to get to the Baseline. Separate them by semicolons. Note that the "*" quantifier needs to be used to iterate zero or more times over a SID, i.e., SID1*;SID2;SID3.


<RequirementContainerItemType>7PRC</RequirementContainerItemType>

 <RequirementItemType>9PRQ</RequirementItemType>

 <RequirementsPartType>9IPQ</RequirementsPartType>

 <BaselineItemType>9VLE</BaselineItemType>

 <PathToBaseline>9IBL;9IPS</PathToBaseline>


The next part establishes which requirements are traced:


<SidsToFollow> contains the SIDs from the context to find all traced requirements. Separate them by semicolons. Note that the "*" quantifier does not need to be used to iterate zero or more times over a SID. The view will handle this case automatically. 


<TracedItemType> is the SID of the requirements that are traced to.


<TraceabilityPartType> is the SID of the part that holds the traceability.


<SidsToFollow>9ISS;9IPR;7IRQ;7ISR;9RTQ</SidsToFollow>

<TracedItemType>9ARQ</TracedItemType>

<TraceabilityPartType>9RTQ</TraceabilityPartType>


The optional <AdditionalAttributeColumnSids> is the attribute SIDs of the trace to requirements, which will result on adding them to the view.


<AdditionalAttributeColumnSids>2RQID;2abvf</AdditionalAttributeColumnSids>


<PathToContextRequirements> is a path expression (see SystemWeaver Path Query Language or the application Help) to find all requirements from the context that it should be possible to trace to.


<PathToContextRequirements>/9ISS*/9IAP[SID='9ARQ']</PathToContextRequirements>  


Next, include a grid definition to define what should be displayed when clicking on Add traceability link.


See the grid introductory training or XML Tag Reference - Grid specific in the application Help for reference.


The final expressions filter all requirements that are already traced from the selected requirement.


<Variable name="alreadyTraced" select="/9ISS*/9IPR*/9IFS*/7IRQ/7ISR*/part::9RTQ[/refobj::/defobj:: in $pSelected]/defobj::" as="Items"/> 


alreadyTraced should contain all requirements traced from the selected requirement.


<If test="not AncestorHandle in $alreadyTraced.Select(AncestorHandle)">


The if statement filters out requirements that already have traceability from the selected requirement.