Exercise 7.8 - Creating a Custom SysML-Jama Mapping with Relationships

Objectives

The new learning objective of this exercise is to create and execute a custom mapping including relationships between SysML and Jama in Syndeia.

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 Jama interface, correctly installed with a valid license for user.

We will use the provided MagicDraw project Syndeia_Jama_Mapping_Tutorial.mdzip (get it here - ). The user can use any Jama repository they have available with the ability to create and edit element within a Jama project. It is generally advisable to carry out these exercises in a non-production repository, a "sandbox", set up for training and practice purposes.

We 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_Jama_Mapping_Tutorial.mdzip provided with the tutorials for this exercise, which loads the profile Syndeia_Mapping_Tutorials_Profile.mdzip. We also use the syndeia34Tutorial.mappings file provided, which has been installed in the .syndeia folder and renamed as syndeia.mappings.

Example – SysML to Jama

The SysML model shown in Figure 1 will be used in a model transform to a Jama repository with the following mapping, which includes both multiple artifact and multiple relationship mappings.

  • Requirement – Jama Requirement

  • Block – Jama Testcase

  • Containment - Containment

  • SysML "Derive Requirement" Abstraction relationship – Jama "Derive from" relationship

  • SysML "Verified by" Abstraction relationship – Jama "Verified by" relationship

    Figure 1 SysML Starter Model

Exercise

  1. Open the SysML project Syndeia_Jama_Mapping_Tutorial.mdzip (get it here - ), right-click the Jama_Relationship_Mapping package, and launch the Syndeia dashboard. Select the Syndeia Cloud project, if used.

  2. Go to the Settings tab (Figure 2) and check the Use mapping element under the General heading, if not already checked. Click Apply.

    Figure 2 Syndeia dashboard, Settings tab, Use mapping checked

  3. Go to the Mappings tab.The first task will be to make a new Jama relation type and a new Jama artifact type available for mapping.

    1. Select Jama under Model Types in the left column. Initially, the window should appear similar to Figure 3.

      Figure 3 Syndeia dashboard, Mappings tab, showing initially-available Jama artifact and relation types

    2. Add a new Jama relation type.

      1. Right-click Jama under Model Types and select Add Relation Type

      2. A new window appears, Add Relation Type

      3. Enter the Type, Name and Description for your new relation type (Figure 4. We use “Verified by”, a standard Jama relationship type available in our Jama repository.

        Figure 4 Add Jama Relation Type window

    3. Add a new Jama artifact type. See Exercise 7.6 for a more extended example with screen shots.

      1. Right-click Jama under Model Types and select Add Artifact Type

      2. Choose a Jama Repository from the top pull-down menu.

      3. Click the Get Jama Item Types button.

      4. Select Test Case from the Item Types pull-down menu. If your Jama repository does not include Test Case as an artifact type, choose another for this exercise.

      5. Click OK. We do not need to add any attributes for this example.

  4. The second task is to create a new mapping using the Jama Test Case artifact. If we look at Figure 1, we see that the mapping for the entire structure must include a mapping of the Engine Size Test block to a Jama Test Case.

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

    2. Set Name to Block -Test Case

    3. Set Description to SysML Block – Jama Test Case

    4. Set Source Artifact Type to Block, using pull-down menu

    5. Set Target Artifact Type to Test Case, using pull-down menu

    6. Set Structure Level to NO_CHILDREN, using pull-down menu

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

    8. Set Include Relations to Exclude Relations, using pull-down menu

    9. Click Save Mapping at the bottom. The window should appear similar to Figure 5. The new mapping should appear in the list under the SysML – Jama mapping group in the left column.

      Figure 5 Syndeia dashboard, Mappings tab, adding a mapping in the SysML-Jama Mapping Group

  5. Having finished the preparations, our primary task is to create a new mapping to transform the entire model in Figure 1, including the relationships.

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

    2. Set Name to Requirement - Requirement (relationships)

    3. Set Description to SysML Requirement - Jama Requirement (relationships)

    4. Set Source Artifact Type to Requirement, using pull-down menu

    5. Set Target Artifact Type to Requirement, using pull-down menu

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

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

    8. Under Stereotypes, click the plus button and select <<Jama_Requirement>> form the Syndeia Mapping Tutorial – Custom Stereotypes profile.

    9. Under Attribute Definition Mappings, click the Retrieve Available Attribute Definitions button

    10. Using the plus button, add the attribute mappings as shown in Figure 6, for ID, Status, Priority and Text.


      Figure 6 Syndeia dashboard, Mappings tab, adding a mapping in the SysML-Jama Mapping Group

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

    12. Using the plus button under Relation Type Mappings, add the relationship mappings as shown in Figure 6, for Derived Requirement – Derived from and Verified by – Verified by.

    13. Using the plus button under Related Mappings, add the related mappings as shown in Figure 6, Block – Test Case.

    14. Click Save Mapping at the bottom. The window should appear similar to Figure 6. The new mapping should appear in the list under the SysML – Jama mapping group in the left column.

  6. Use the new mapping on the sample SysML model.

    1. In the Connection Manager tab, display the SysML model in the left column, expanded to show Engine Requirement.

    2. Display a Jama project in the right column that will be the target for the model transform, Syndeia Test in this example

    3. Select Model Transform in the center column.

    4. Drag Engine Requirement from the SysML column onto the Jama project.

    5. From the Select Mapping Specification pull-down menu, select the mapping just created, Requirement - Requirement (relationships), and click OK (Figure 7).

      Figure 7 Model transform from SysML Engine Requirement to Jama Syndeia Test project

  7. Four new requirements and a test case should have been created in Jama. Open the Liftoff Requirement by right-clicking it in the SysML column and select Open Connected Artifacts. The Jama web browser should open similarly to Figure 8. The mapped relationship back to Engine Power Requirement appears at the bottom under Upstream Items.

    Figure 8 New Jama issue, showing Derived from upstream relationship to Engine Power Requirement

  8. From the Syndeia dashboard, Connection Browser or Connection Search tab, execute Compare Source and Target on the connection from Engine Power Requirement. The results should appear similar to Figure 9. Note the "Derived" relationships on both sides connecting Engine Power Requirement to Liftoff Requirement.

    Figure 9 Comparison Results across Engine Power Requirement connection

  9. In the SysML model, delete the <<deriveReqt>> relationship from the model. Run Compare Source and Target again from the Engine Power Requirement connection. The results should now appear similar to Figure 10.

    Figure 10 Comparison Results across Engine Power Requirement connection after modifying SysML model