Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

The new learning objective of this exercise is to create new SysML_Jama mappings for Data Map and 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.

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.2 installed as a plugin for Rhapsody with a valid license for use
  • Syndeia Jama 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)

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.

Using mapping in Syndeia requires two new elements which are provided with these tutorials

  • A mappings file, syndeiaTutorial_Rh.mappings, which contains the specific starting mappings used in this and the following exercises. To install this,
  1. Close Rhapsody, if it is open
  2. Rename the existing syndeia.mappings file in the .syndeia folder to something like syndeiaOld.mappings
  3. Copy syndeiaTutorial_Rh.mappings into the .syndeia folder
  4. Rename syndeiaTutorial_Rh.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, SyndeiaTutorialMapping.sbs, which is loaded into a TutorialMappingProfile folder in the profiles folder of Syndeia installation:
    C:\Users\<account>\<Rhapsody installation> \Share\Profiles\Syndeia\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.

Many organizations customize their Jama installation, creating new artifact and relationship types for their purposes. This tutorial exercise uses common artifact types in a standard Jama installation, but you may need to adapt the instructions if these artifact types are not available to you. Prior to your doing this exercise, a user with the mapping license described above would need to register the new artifact types for mapping (as described in Exercise 7.7)

Caution: Rhapsody has, by default, restrictions on the naming of SysML elements, which can create problems when Syndeia tries to create Rhapsody model elements that violate these restriction, e.g. beginning a SysML block name with a number.  We recommend modifying any Rhapsody models you create to relax these restrictions. Modify the properties of the top-level package of the model under General::Model::NamesRegExp with the following string and save - ^(([a-zA-Z0-9_][a-zA-Z0-9_ ():-]*)|(operator.+))$

Exercise

  1. Open the SysML project Syndeia_Jama_Mapping_Tutorial.rpy, right-click the Jama package, and launch the Syndeia dashboard.
  2. Go to the Mappings tab. Initially, the window should appear similar to Figure 1. The first task will be to create a new mapping using existing artifacts.



    1. Right-click SysML-Jama under Mapping Groups in the left column and select Add Mapping
    2. Modify the Mapping
      1. Change Name to Activity – Test Case (no attributes)
      2. Change Description to SysML Activity – Jama Test Case with no attributes
      3. Change Source Artifact Type to Activity, using pull-down menu
      4. Set Target Artifact Type to Test Case, using pull-down menu
      5. Set Structure Level to NO_CHILDREN, using pull-down menu
      6. Set Include Attributes to Exclude Attributes, using pull-down menu
      7. The window should look similar to Figure 2.



      8. Click Save Mapping at bottom of right side (scroll down if necessary).
  3. Use the new Mapping you just created
    1. Go to the Connection Manager tab. Open a Jama repository in the right column.
    2. Drag the J2::Test_NewFeature activity in the SysML model into an empty set or component in Jama (Jama_Tutorial in this example).
    3. A small pull-down menu will appear on the Syndeia dashboard, as Figure 3, showing the possible mappings available for an activity dragged into Jama.



    4. Select Activity – Test Case (no attributes) and click OK.
    5. Expand the Jama_Tutorial component on the right side of the Connection Manager. Check that a new test case has been created in Jama.
  4. The second task is to create another new mapping, this one with attributes shared between the SysML and Jama elements. We will use the Clone Mapping command rather Add Mapping. Clone Mapping saves time when not all features of the new mapping need to be modified.
    1. Right-click Activity – Test Case (no Attributes) under Mapping Groups/SysML - Jama in the left column and select Clone Mapping.
    2. Modify the Mapping
      1. Change Name to Activity – Test Case (attributes)
      2. Change Description to SysML Activity – Jama Test Case with attributes
      3. Keep Source Artifact Type as Activity and Target Artifact Type as Test Case
      4. Set Structure Level to NO_CHILDREN, using pull-down menu
      5. Set Include Attributes to Include Attributes, using pull-down menu. At this stage, the mapping window should appear similar to Figure 4.



      6. At the bottom of the right side, click the + sign box under the Stereotypes table.
      7. A Select stereotype window will open. The mapping window should look similar to Figure 5.



      8. Select Jama_Testcase. This choice will appear in the Select Stereotype box on the left.
      9. Scroll up to Attribute Definition Mappings
      10. Click Retrieve Available Attribute Definitions
      11. Click the + box below the Attribute Definition Mappings box.
      12. In the new row, select ID(documentKey) on the right (Target) side of the table, using the pull-down menu.
      13. In the new row, select id [owner: Stereotype(Jama_Testcase)] on the left (Source) side of the table.
      14. Repeat steps xi through xiii for Description, Test Case Status, and Priority. The final table should look like Figure 6.



      15. Click Save Mapping at bottom of right side (scroll down if necessary).
  5. Use the cloned Mapping you just created
    1. Go to the Connection Manager tab. Open the same Jama repository you used above in the right column.
    2. Drag the Test_NewFeature Jama testcase created earlier into the empty SysML J4
    3. A small pull-down menu will appear on the Syndeia dashboard, as in Figure 7, showing the possible mappings available for an item dragged into SysML.



    4. Select Activity – Test Case (attributes) and click OK.
  6. A new activity (named Test_NewFeature) should appear under J4 on the SysML side. It will have the <<Jama_Testcase>> stereotype in addition to Activity and the tag values associated with that stereotype. The four Jama attributes mapped in the Activity – Test Case (attributes) mapping appear (see Figure 8).



    Note that SysML activities do not normally have any place to receive the Jama attributes. Because the <<Jama_Testcase>> stereotype was chosen in the new mapping definition, the new activity was created with that additional stereotype and tag values ready to receive the desired Jama attributes.
  7. Modify the new SysML testcase J4::Test_NewFeature .
    1. In the Features window (Figure 8), edit the priority tag to High and add text to the description field, e.g. “FieldTest”.



  8. Compare across the new testcase connection
    1. In the Syndeia dashboard, Connection Browser tab, find the connection from J4::Test_NewFeature.
    2. Right-click and choose Compare Source & Target.
    3. The Comparison Result tab should show discrepancies in the priority and description fields, like those shown in Figure 9.



    4. In the Connection Browser tab, select Sync Source to Target for the same connection.
    5. Confirm that the differences have been resolved by updating Jama from SysML.
  • No labels