Exercise 5.8 - Creating Custom SysML-DOORS NG Mappings with Relationships

Objectives

The new learning objective of this exercise is to create new SysML_DOORS NG mappings that include relationships for Model Transform connections. This is intended for an advanced user who will create new mappings that will be used by other members of the organization.

Preparation

This exercise assumes the student has

  • Cameo System Modeler 18.0 - 19.0 (or MagicDraw with SysML plug-in) installed correctly on his or her machine with a valid license for use, and

  • Syndeia 3.3 installed as a plugin for Cameo/MagicDraw with a valid license for use

  • Syndeia DOORS NG interface, correctly installed with a valid license for user.

The user can use any DOORS NG repository they have available with the ability to create and edit elements within a DOORS project. Carrying out this exercise will require the user to create artifacts and relationships compatible with their own DOORS NG project. Review Exercise 5.6 on adding DOORS artifacts to the Model Types list. It is generally advisable to carry out these exercises in a non-production repository, a "sandbox", set up for training and practice purposes.

We also recommend that the student view the videos 1.6, 1.7, and 1.8 in the Introduction Section of the Syndeia training materials before attempting this exercise. These videos provide important background on creating custom mappings. Hands-on tutorials omit much of the logic behind the actions in the interest of clarity and brevity.
We will use the MagicDraw project Syndeia_DNG_Mapping_Tutorial.mdzip provided with the tutorials for this exercise, which loads the profile Syndeia_Mapping_Tutorials_Profile.mdzip (get it here - https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2407364009). We also use the syndeia34Tutorial.mappings file provided, which has been installed in the .syndeia folder and renamed as syndeia.mappings.
Any Syndeia user can use or view the mapping specifications, but Syndeia requires a special license in addition to the regular Syndeia license in order to create, modify or delete mapping information. It is good practice to confine this duty to a very limited number of experienced users or system administrators, who will provide mappings for the general users.

Special Note on DOORS NG Relation Types

  1. Model transforms from SysML to DOORS NG are complicated by two special features of DOORS NG and Syndeia.

    1. DOORS NG relation types are registered on a project-by-project basis. It is only possible for Syndeia to create a new relation in a DOORS NG project if that project already recognizes that relation type and the user has permission to create new relations of that type in that project.

    2. It is also only possible for Syndeia to create a new relation in a DOORS NG project if the OSLC standard supports that relation type. The allowed relationships are affectedByelaboratedByimplementedBysatisfiedByspecifiedBytrackedByuses, and validatedBy, as listed here.

    3. If a relationship type meets requirement a), but not b), it will work for model transforms from DOORS NG to SysML, but not for SysML to DOORS NG.

    4. Because of these features, the user may need to modify the instructions for the following exercise to accommodate the specific DOORS NG project available in order to complete the exercise.

  2. To discover what relation types are already available in a specific DOORS NG project, the user can

    1. open DOORS NG in a web browser

    2. navigate to the desired project(Unmanned Aerial Vehicle in our example, Figure 1), click the Administration icon in the upper right corner, and select Manage Project Properties.

      Figure 1 DOORS NG dashboard, Administration icon (Gear), Manage Project Properties

    3. The available link types for this project are shown when we select Link Types in the second menu bar (Figure 2).

      Figure 2 DOORS NG dashboard, Link Types menu item highlighted

    4. Unlike DOORS artifact types, relation types may work across multiple DOORS projects if all those projects support that link/relation type. However, designating DOORS relation types as DOORS project-specific, as we do in this exercise, may keep mapping development simpler.

Special Note on DOORS Collection Relations

SysML has the Containment relationship for nested elements. DOORS NG Collection-type artifacts can have nested artifacts (requirements, tests, etc.), but DOORS NG does not have an explicit relationship type for this nesting.
Because of this, Syndeia users should not try to create a relationship mapping from SysML Containment links to the nesting of DOORS requirements inside a DOORS collection. Both DOORS collections and requirements may be used as artifact types in custom mappings, but the relationship between them should be omitted from the Relation Type Mappings table. Syndeia will map this automatically to SysML Containment during model transform.

An alternative approach to creating requirement hierarchies in DOORS uses the Parent Of/ Child Of relationship, where one requirement is parent of one or more subrequirements. This relationship may be used in custom mappings, but only works for model transform from DOORS to SysML (see Special Note on DOORS NG Relation Types).

Example – SysML to DOORS NG

The SysML model shown in Figure 3 will be used in a model transform to a DOORS NG project with the following mapping.

  • SysML Requirement – DOORS Requirement

  • SysML Containment relation – DOORS Elaborated by relation

  • SysML deriveReqt relation – DOORS Specified By relation

  • SysML Block – DOORS Feature (UAV)

  • SysML satisfy relation – DOORS Affected By relation

  • SysML part property relation – DOORS Elaborated by relation


    Figure 3 SysML Starter Model

Exercise

  1. If not still open from the previous exercise, open the SysML project Syndeia_DOORS_NG_Mapping_Tutorial.mdzip (get it here - https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2407364009), right-click the DOORS_NG package, and launch the Syndeia dashboard. Select a Syndeia Cloud project, if necessary.

  2. Go to the Mappings tab. This exercise assumes you created a DNG artifact type Requirement (UAV) in Exercise 5.6 and a SysML-DNG mapping Reqt – Reqt (UAV) attributes in Exercise 5.7. If not, complete those exercises now.

  3. Create a new DNG relation type , Specified By (UAV). Right-click DOORS_NG under Model Types,select Add Relation Type, and complete the dialog box as in Figure 4. Click OK.

    Figure 4 Syndeia dashboard, Mappings tab, adding the Specified By (UAV) artifact type

  4. Repeat with another DNG relation type, Elaborated By (UAV). See Figure 5.

    Figure 5 Syndeia dashboard, Mappings tab, adding the Elaborated By (UAV) artifact type

  5. The next task will be to create a new mapping using these artifact and relation types.

    1. Right-click SysML-DOORS NG under Mapping Groups in the left column and select Add Mapping.

    2. Edit the Mapping characteristics

      1. Change Name to Reqt - Reqt (UAV) relations.

      2. Change Description to SysML Reqt - DNG Reqt (UAV) with relations.

      3. Change Source Artifact Type to Requirement, using pull-down menu

      4. Set Target Artifact Type to Requirement (UAV), using pull-down menu

      5. Set Structure Level to CHILDREN_RECURSIVE, using pull-down menu

      6. Set Include Attributes to Include Attributes, using pull-down menu

      7. Add <<DOORS_Requirement>> stereotype.

      8. Click Retrieve Available Attribute Definitions and add attribute mappings as shown in Figure 6

      9. Set Include Relations to Include Relations, using pull-down menu

      10. Click plus button under Relation Type Mappings and add relations row-by-row as shown in Figure 6, Derived Requirement – Specified By (UAV) and Containment – Elaborated By (UAV).

      11. Click Save Mapping at bottom.

      12. The window should look similar to Figure 6.


        Figure 6 Syndeia dashboard, Mappings tab, adding new mapping to SysML-DOORS NG Mapping Group

  6. Use the new mapping you just created

    1. Go to the Connection Manager tab. Open your SysML model in the left column and yours DOORS NG repository in the right column. Select Model Transform in the center.

    2. Drag UAV Requirement in the SysML model into a project or folder in DOORS NG (Custom Transforms in this example) with the Reqt – Reqt (UAV) relations mapping (Figure 7).

      Figure 7 Connection Manager tab before model transform

  7. Under the Custom Transforms folder in DOORS, there are now eight new requirements (Figure 8) corresponding to the eight SysML requirements in Figure 3. Right-click on Engine Size Requirement and open DOORS. Expand Links on the lower right (Figure 9) and see that Engine Size Requirement "elaborates" Engine Requirement and is "specified by" Liftoff Requirement, as set out in the custom mapping.


    Figure 8 Connection Manager tab after model transform


    Figure 9 DOORS browser, Engine Size requirement

  8. Create an new mapping to add the SysML blocks in Figure 3 to the DOORS model.

    1. Add a new relation type Affected By /Affected By (UAV) to the DOORS NG Model Types (see Step 3).

    2. Add a new artifact type Feature/Feature (UAV) to the DOORS NG Model Types (see Exercise 5.6).

    3. Add a new SysML-DOORS NG mapping, Block – Feature (UAV) relations

      1. Change Name to Block – Feature (UAV) relations.

      2. Change Description to Block – Feature (UAV) relations.

      3. Change Source Artifact Type to Block, using pull-down menu

      4. Set Target Artifact Type to Feature (UAV), using pull-down menu

      5. Set Structure Level to CHILDREN_RECURSIVE, using pull-down menu

      6. Set Include Attributes to Exclude Attributes, using pull-down menu

      7. Set Include Relations to Include Relations, using pull-down menu

      8. Click plus button under Relation Type Mappings and add relations row-by-row as shown in Figure 10, Part Property – Elaborated By (UAV) and Satisfies – Affected By (UAV).

      9. Click plus button under Related Mappings and select Reqt – Reqt (UAV) relations.

      10. Click Save Mapping at bottom.

      11. The window should look similar to Figure 10.

        Figure 10 Syndeia dashboard, Mappings tab, Adding Block – Feature (UAV) Mapping

    4. Drag the UAV block into the Custom Mappings folder using the Block – Feature (UAV) mapping. The blocks and their relationships are added to the DOORS NG model, as indicated by the links shown for the UAV feature in DOORS (Figure 11).

      Figure 11 DOORS browser, UAV feature