Exercise 8.6 - Adding SysML–JIRA Artifact Types

Objectives

The new learning objective of this exercise is to add additional JIRA artifacts for creating new mappings for Model Transform connections. These can be standard JIRA element types or user-defined element types.

Preparation

This exercise assumes the student has

  • Cameo System Modeler 18.5 - 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 - https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2407364009). 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.

Exercise

  1. Open the SysML project Syndeia_JIRA_Mapping_Tutorial.mdzip (get it here - https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2407364009), 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 artifact type available for mapping.

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

      Figure 1 Syndeia dashboard, Mappings tab, showing available JIRA artifact types

    2.   Add a new JIRA artifact type.

      1. Right-click JIRA and select Add Artifact Type

      2. A new window appears, Add JIRA Artifact 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 Types button

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

        Figure 2 Add JIRA Artifact Type window

      6. Select Improvement, assuming your JIRA repository includes this artifact type.

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

  3. Specify the JIRA artifact attributes to be available for mapping

    1. Near the bottom of the window, click the Get Issue Properties button.

    2. The table add attribute definitions… will be populated, as Figure 3.

      Figure 3 Add JIRA Artifact Type window, lower half

    3. Select the Improvement attributes you want to be available for mapping and click OK. In our example, these are Priority and Summary.

  4. The second task is to create another new mapping using the new JIRA model element type.

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

    2. Set Name to Block – Improvement (attributes)

    3. Set Description to SysML Block - JIRA Improvement with attributes

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

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

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

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

    8. Add a stereotype <<JIRA_Artifact>> by clicking the plus button next to the Stereotypes table.

    9. Click Retrieve Available Attribute Definitions button below the Attribute Definition Mappings table.

    10. Using the plus button, create the Attribute Definitions Mappings table line-by-line, pairing up attributes in Block/<<JIRA_Artifact>> and Improvement.

    11. The window should appear similar to Figure 4.

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

    12. Click Save Mapping at the bottom. The new mapping should appear in the list under the SysML – JIRA mapping group in the left column and should be available in the Select Mapping Specification window when creating a Model Transform connection.