Exercise 8.7 - Creating and Using SysML–JIRA Mappings with Relationships


Objectives

The new learning objective of this exercise is to create a SysML – JIRA mapping with relationships.

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

  • Syndeia Mappings license, to modify syndeia.mappings file from the Syndeia dashboard (without the special mappings license, existing mappings can be used, but not modified)

We will use the provided MagicDraw project Syndeia_JIRA_Mapping_Tutorial.mdzip (get it here - ). The user can use any JIRA repository they have available with the ability to create and edit issues within a JIRA 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. These hands-on tutorials omit much of the logic behind the actions in the interest of clarity and brevity.
Using mapping in Syndeia requires two new elements which are provided with these tutorials

A mappings file, syndeia34Tutorial.mappings, which contains the specific starting mappings used in this and the following exercises. To install this,

  1. Close MagicDraw, if it is open

  2. Rename the existing syndeia.mappings file in the .syndeia folder to something like syndeiaOld.mappings

  3. Copy syndeia34Tutorial.mappings into the .syndeia folder

  4. Rename syndeia34Tutorial.mappings as syndeia.mappings

  5. When you have completed the mapping tutorial exercises, you may want to reverse this process to restore the original mappings file.

A mappings profile, Syndeia_Mapping_Tutorials_Profile.mdzip, which is loaded like other profiles
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. Some mappings require a special SysML stereotype to correctly transform attributes to or from a SysML element, so each mappings file should be paired with a SysML profile that holds the required stereotypes, as we have done here.

Example – SysML to JIRA

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

  • Block (JIRA_Artifact) – Improvement

  • SysML Dependency relationship – JIRA Blocks relationship

  • SysML Allocate relationship – JIRA Relates relationship

    Figure 1 SysML Starter Model

Exercise

  1. Open the SysML project Syndeia_JIRA_Mapping_Tutorial.mdzip (get it here - ), right-click the JIRA package, and launch the Syndeia dashboard.

  2. Go to the Mappings tab. The first task will be to make a new JIRA relation type available for mapping.

    1. Select JIRA under Model Types in the left column. Initially, the window should appear similar to Figure 2, with three existing JIRA relation types available.

      Figure 2 Syndeia dashboard, Mappings tab, showing available JIRA artifact  and relation types

    2. Add a new JIRA relation type.

      1. Right-click JIRA and select Add Relation Type

      2. A new window appears, Add JIRA Relation Type

      3. Use the JIRA Repository pull-down menu to choose a JIRA repository you have previously entered the credentials for

      4. Click the Get JIRA Issue Link Types button

      5. Use the pull-down menu under Issue Link Types to view all the JIRA relation types Syndeia can find, as shown in Figure 3.

        Figure 3 Add JIRA Artifact Type window

      6. Select Blocks, assuming your JIRA repository includes this relation type.

      7. ID, Type, Name and Description fields will be populated. Name and Description can be modified, if desired.

  3. The second task is to create a new mapping using the new JIRA relation type.

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

    2. Set Name to Block (JIRA Artifact) - New Feature (Relationships)

    3. Set Description to SysML Block (JIRA Artifact) - JIRA New Feature with Relationships

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

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

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

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

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

  4. Click the plus button under the Relation Type Mappings table and add the relationship mappings line-by-line using the pull-down menus in each field.

    1. In the Source column, Dependency, maps to Blocks under Target.

    2. In the Source column, Allocate (Abstraction), maps to Relates under Target.

  5. The window should appear similar to Figure 4.

    Figure 4 Syndeia dashboard, Mappings tab, adding a mapping in the SysML-JIRA Mapping Group

  6. Click Save Mapping at the bottom. The new mapping should appear in the list under the SysML – JIRA mapping group in the left column.

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

    1. Check that Use mapping is checked in the Settings tab.

    2. In the Connection Manager tab, display the SysML model in the left column, expanded to show J4:UAV Issue A.

    3. Display the JIRA project in the right column that will be the target for the model transform.

    4. Select Model Transform in the center column.

    5. Drag UAV Issue A from the SysML column onto the JIRA project (Syndeia Demo Box in this example).

    6. From the Select Mapping Specification pull-down menu, select the mapping just created, Block (JIRA_Artifact) – New Feature (Relationships), and click OK (Figure 5).

      Figure 5 Model transform from SysML J4:UAV Issue A to JIRA project Syndeia Demo Box

  8. Four new issues should have been created. To open the top-level issue, right-click on UAV Issue A in the left column and select Open Connected Artifacts. The JIRA web browser should open similarly to Figure 6. The mapped relationships appear at the bottom under Linked Issues, with two different types of relationships as designated in the new mapping.

    Figure 6 New JIRA issue, showing “blocks” and “relates to” Linked Issues