Exercise 7.5 - Using SysML-Jama Mappings.

Objectives

The new learning objective of this exercise is to explore and use existing SysML-Jama mappings for Model Transform connections.

Preparation

This exercise assumes the student has

  • IBM Rational Rhapsody 8.2 installed correctly on his or her machine with a valid license for use, and

  • Syndeia 3.3 installed as a plugin for Rhapsody with a valid license for use

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

The user can use any Jama repository they have available with the ability to create and edit model elements within a Jama model. It is generally advisable to carry out these exercises in a non-production repository, a "sandbox", set up for training and practice purposes. We will use the Rhapsody project Syndeia_Jama_Mapping_Tutorial.rpy provided with the tutorials for this exercise, which loads the profile Syndeia_Mappings_Tutorial_Profile.sbs. We also use the syndeia33TutorialRhp.mappings file provided, which has been installed in the .syndeia folder and renamed as syndeia.mappings.

Exercise

  1. Open the SysML project Syndeia_Jama_Mapping_Tutorial.rpy, right-click the Jama_Mapping package, and launch the Syndeia dashboard. Select the Syndeia Cloud project, if used.

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

    Figure 1 Syndeia dashboard, Settings tab, Use mapping checked

  3. Go to the Mappings tab. The contents of the main area on the right will depend on the element selected on the left. Expand Mapping Groups and select SysML-Jama on the left to see the existing mappings in this area (Figure 2).

    Figure 2 Syndeia dashboard, Mappings tab, Mapping Groups/SysML-Jama expanded on left

  4. The first task is to drag a hierarchy of SysML requirements into Jama to create an equivalent Jama hierarchy.

    1. Go to the Connection Manager tab and set Connection Type to Model Transform in the central column.

    2. Open the SysML model in the left column and your Jama repository in the right. Expand the SysML model to show Jama_Mapping::J1::Product_Spec.

    3. Drag the Product Spec requirement onto the target Jama component (Jama_Tutorial in this example)

    4. Select Reqt - Reqt (no attributes) and click OK (Figure 3).

      Figure 3  Syndeia Dashboard, Connection Manager tab

  5. We can view the new Jama requirements created by expanding the right side of the Connection Manager (see Figure 4). The SysML requirement structure is preserved.

    Figure 4  New Jama requirements viewed in Syndeia dashboard

    1. You can view the new requirements created in Jama. If you right-click the new requirement Feature_1_Environmental in either column and select Open, the Jama web interface should open to that requirement.

    2. While the Jama interface is open, modify the requirement. The model transform operation just performed used a mapping that did not carry over attributes from SysML, so the Description and Priority fields in Jama (among others) are empty, while the ID and Status fields have default entries. Enter some values into Description and Priority, as shown in Figure 5, and save.

      Figure 5 Modified Jama requirement viewed in Jama web interface

    3. While in the Jama web interface, refresh the parent requirement, Product_Spec, of the requirement just modified, before closing the interface. This is necessary to update the parent requirement before proceeding with the second part of the exercise.

  6. In the second example, we will use a different mapping when we drag the Jama requirement back into SysML.

    1. Return to the Mappings tab in the Syndeia dashboard and select the mapping Reqt - Reqt (attributes) in the left column (Figure 6). We see that this mapping is associated with a special SysML stereotype, <<Jama_Requirement>>, which contains tag values priority and status, corresponding Jama attributes that are not part of the standard SysML requirement, but that we want to bring into the SysML model. On the right side next to Attribute Definition Mappings, there is a table showing the desired mappings between the SysML (Source) element tag values and the Jama (Target) attributes.

      Figure 6  Syndeia mapping for Reqt - Reqt (attributes)

    2. In the Syndeia dashboard, Connection Manager tab, select the Model Transform connection type, drag the Feature_1_Environmental item into an empty SysML package, e.g. Jama_Mapping::J3, and select the Reqt - Reqt (attributes) mapping.

    3. You can view the new requirement created in Rhapsody. If you create and populate a requirement diagram, it should appear similar to Figure 7. The <<Jama_Requirement>> stereotype has been applied and the associated tag values have been added.

      Figure 7  New SysML requirement created by different mapping

  7. The Compare & Sync features of Syndeia work with custom mappings just as they do with default mappings. To demonstrate,

    1. Modify the SysML requirement attributes, e.g set priority to High and Text to 95% recyclable.

    2. Go to the Syndeia Dashboard, Connection Browser tab, and find the new connection between the SysML and Jama requirements (see Figure 8).

      Figure 8  Syndeia Dashboard, Connection Browser tab, new connection

    3. Right-click the connection and select Compare Source and Target and confirm. The Comparison Result tab will open (Figure 9), showing differences in the Text and priority fields between the SysML and Jama requirements

      Figure 9  Syndeia Dashboard, Comparison Results tab, after compare operation

    4. Return to the Connection Browser and select Sync Target to Source. Confirm that the SysML requirement tag values have returned to original Jama values and that a comparison between the two requirements shows all green.

    5. Alternatively, the sync in d) could have been Sync Source to Target, using the modified SysML attributes to update the Jama requirement. This assumes that the user has Write privileges to the Jama repository and that the Jama attribute is editable through the Jama API (ID, for example, is not).

  8. Save and close the model. If you have a Mapping license that allows you to modify mappings, proceed to the next tutorial exercises.