Exercise 11.8 - Creating SysML-Teamcenter Mappings

Objectives

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

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

We will use the provided MagicDraw project Syndeia_Teamcenter_Mapping_Tutorial.mdzip. The user can use any Teamcenter 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_Teamcenter_Mapping_Tutorial.mdzip (get it here - ) 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. 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.

Special Note on SysML Stereotypes

As demonstrated below, some mappings require special SysML stereotypes so that the SysML element involved in the mapping has tag value slots for the attributes to be mapped. In this exercise, you will use stereotypes from the Syndeia_Mappings_Tutorial_Profile.mdzip (get it here - ) which should be loaded automatically with the model. However, in your own work, you can create stereotypes as needed and add them to your SysML model, either individually or as a profile. See the documentation for your SysML tool for instructions.
It is critical to remember that the mapping recognizes the stereotype by its ID, not its name. If the stereotype ID in the model is not the same as in the mapping, the mapping will not function as intended. The easiest way to avoid problems is to distribute the mappings file and the SysML profile as a pair which has been tested to ensure that the IDs match for the users

Exercise

  1. Open the SysML project Syndeia_Teamcenter_Mapping_Tutorial.mdzip (get it here - ), right-click the Teamcenter_Mapping package, and launch the Syndeia dashboard. Select a Syndeia Cloud project, if necessary.

  2. Go to the Mappings tab. The first task will be to create a new mapping using existing artifacts.

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

    2. Initially, the window should appear similar to Figure 1.

      Figure 1 Syndeia dashboard, Mappings tab, Adding Mapping to SysML-Teamcenter Mapping Group

    3. Modify the Mapping

      1. Change Name to Activity – Item (no attributes)

      2. Change Description to SysML Activity – Teamcenter Item with no attributes

      3. Change Source Artifact Type to Activity, using pull-down menu

      4. Set Target Artifact Type to Item, using pull-down menu

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

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

      7. The window should look similar to Figure 2.

        Figure 2 Syndeia dashboard, Mappings tab, Adding Mapping, part 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 Teamcenter repository in the right column.

    2. Drag the T2::Feature_Auto activity in the SysML model into an empty folder in Teamcenter (Demo 8 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 Teamcenter.

      Figure 3 Connection Manager while creating new Teamcenter items with new mapping

    4. Select Activity – Item (no attributes) and click OK.

    5. Expand the Demo 8 folder on the right side of the Connection Manager. Check that a new set of items has been created with default attribute values assigned by Teamcenter.

  4. The second task is to create another new mapping, this one with attributes shared between the SysML and Teamcenter 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 – Item (no attributes) under Mapping Groups/SysML - Teamcenter in the left column and select Clone Mapping

    2. Initially, the window should appear similar to Figure 4.

      Figure 4 Syndeia dashboard, Mappings tab, cloning a mapping in the SysML-Teamcenter Mapping Group

    3. Modify the Mapping

      1. Change Name to Activity – Item (attributes)

      2. Change Description to SysML Activity – Teamcenter Item with attributes

      3. Keep Source Artifact Type as Activity and Target Artifact Type as Item

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

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

      6. Click the plus sign box under the Stereotypes table.

      7. A Select stereotype window will open. The window should look similar to Figure 5 (see Special Note on SysML Stereotypes above).

        Figure 5 Syndeia dashboard, Mappings tab, modifying the cloned mapping, part 1

      8. Select Intercax_Artifact. This choice will appear in the Stereotype box on the right.

      9. Click Retrieve Available Attribute Definitions under the Attribute Definition Mappings table.

      10. Click the plus sign box below the Attribute Definition Mappings box.

      11. In the new row, select item_id on the right (Target) side of the table, using the pull-down menu

      12. In the new row, select id [owner: Stereotype (Intercax_Artifact)] on the left (Source) side of the table.

      13. Repeat steps xi through xiii for object_type and Gov Classification. The final table should look like Figure 6.

        Figure 6 Syndeia dashboard, Mappings tab, modifying the cloned mapping, part 2

      14. 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 Teamcenter repository you used above in the right column.

    2. Drag the Feature_AutoInit Teamcenter item created earlier into the empty SysML T4 package.

    3. A small pull-down menu will appear on the Syndeia dashboard, as in Figure 7, showing all the possible mappings available for an item dragged into SysML.

    4. Select Activity – Item (attributes) and click OK.

      Figure 7 Connection Manager while creating new SysML Activity with cloned mapping

  6. A new activity (named Feature_AutoInit) should appear under T4 on the SysML side. It will have the <<Intercax_artifact>> stereotype in addition to Activity and all the tag values associated with that stereotype. However, only the id and type attributes mapped in the Activity – Item (attributes) mapping have been populated in the SysML element from the Teamcenter item (see Figure 8).

    Figure 8  New SysML activity created by cloned mapping
    Note that SysML activities do not normally have any place to receive the Teamcenter attributes. Because the <<Intercax_artifact>> 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 Teamcenter attributes.

  7. Modify the new SysML activity to demonstrate compare and sync features of mapped attributes.

    1. In SysML, add a value (e.g. USA) to the govClass tag using the specification window (do not use HTML formatting).

    2. In the Syndeia dashboard, Connection Browser tab, find the connection from T4::Feature_AutoInit to Teamcenter (Figure 9). Right-click this row and select Compare Source & Target.

      Figure 9 Syndeia dashboard, Connection Browser tab, T4::Feature_AutoInit connection to Teamcenter

    3. The Comparison Result tab will show the differences between the SysML and Teamcenter models (Figure 10). The difference table shows that the SysML model has a value for the govClass attribute.

      Figure 10 Syndeia dashboard, Comparison Result tab, T4::Feature_AutoInit connection to Teamcenter

    4. Return to the Syndeia dashboard, Connection Browser tab, and the connection from T4::Feature_AutoInit to Teamcenter (Figure 9). Right-click this row and select Sync Source to Target.

    5. Repeat the comparison and see that all differences have been resolved by updating the Teamcenter model.