...
Open the SysML project Syndeia_Jama_Mapping_Tutorial.rpy, right-click the Jama_Mapping package, and launch the Syndeia dashboard. Select a Syndeia Cloud project if necessary.
Go to the Mappings tab. If you expand SysML-Jama under Mapping Groups in the left column, the window should appear similar to Figure 1
Anchor _Hlk501357103 _Hlk501357103 . The first task will be to create a new mapping using existing artifacts. We assume you have completed Exercise 7.6 and added Failure Mode as an artifact type to Model Types: Jama. If not, do Exercise 7.6 now.Figure 1 Syndeia dashboard, Mappings tab, SysML-Jama Mapping Group
Right-click SysML-Jama and select Add Mapping
Modify the Mapping
Change Name to Activity - Failure Mode (no attributes)
Change Description to SysML Activity – Jama Test Case with no attributes
Change Source Artifact Type to Activity, using pull-down menu
Set Target Artifact Type to Failure Mode, using pull-down menu
Set Structure Level to NO_CHILDREN, using pull-down menu
Set Include Attributes to Exclude Attributes, using pull-down menu
The window should look similar to Figure 2.
Figure 2 Syndeia dashboard, Mappings tab, Adding Mapping to SysML-Jama Mapping Group
Click Save Mapping at bottom of right side (scroll down if necessary).
Use the new Mapping you just created
Go to the Connection Manager tab. Open a Jama repository in the right column, the SysML model in the left column, and select Model Transform in the center.
Drag the J2::Test_NewFeature activity in the SysML model into an empty set or component in Jama (Jama_Tutorial in this example).
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.
Select Activity – Failure Mode (no attributes) and click OK.
Expand the Jama_Tutorial component on the right side of the Connection Manager. Check that a new Failure Mode has been created in Jama.
Figure 3 Connection Manager while creating new Jama Failure Mode with new mapping
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.
Right-click Activity – Failure Mode (no attributes) under Mapping Groups/SysML - Jama in the left column and select Clone Mapping
Modify the Mapping
Change Name to Activity – Failure Mode (attributes)
Change Description to SysML Activity – Jama Failure Mode with attributes
Keep Source Artifact Type as Activity and Target Artifact Type as Failure Mode.
Set Structure Level to NO_CHILDREN, using pull-down menu
At this stage, the window should appear similar to Figure 4.
Figure 4 Syndeia dashboard, Mappings tab, cloning a mapping in the SysML-Jama Mapping Group
Set Include Attributes to Include Attributes, using pull-down menu
Click the plus sign box under the Stereotypes table.
A Select stereotype window will open. The window should look similar to Figure 5 (see Special Note on Rhapsody SysML Stereotypes in Exercise 7.6).
Figure 5 Syndeia dashboard, Mappings tab, modifying the cloned mapping, part 1
Select Jama_FailureMode and click OK. This choice will appear in the Stereotypes box.
Click the Retrieve Available Attribute Definitions button below the Attribute Definition Mappings table.
Click the plus box below the Attribute Definition Mappings box.
In the new row, select Failure Mode on the right (Target) side of the table, using the pull-down menu showing Jama attributes.
In the new row, select name on the left (Source) side of the table, showing SysML attributes.
Repeat steps xi through xii for the other attributes (GlobalID/Id and Cause of Failure/source) so that the final table looks like Figure 6.
Figure 6 Syndeia dashboard, Mappings tab, modifying the cloned mapping, part 2
Click Save Mapping at bottom of right side.
Use the cloned Mapping you just created
Go to the Connection Manager tab. Open the Jama repository you used above in the right column.
Drag the Test_NewFeature Jama testcase created earlier into the empty SysML J4 package.
A small pull-down menu will appear on the Syndeia dashboard, as in Figure 7, showing the possible mappings available for a Jama Failure Mode artifact dragged into SysML.
Figure 7 Connection Manager while creating new SysML Activity with cloned mapping
Select Activity – Failure Mode (attributes) and click OK.
A new activity (named Test_NewFeature) should appear under J4 on the SysML side. It will have the <<Jama_Failure Mode>> stereotype in addition to Activity and all the tag values associated with that stereotype. In a SysML diagram, this would appear as in Error! Reference source not found..
Note that SysML activities do not normally have any place to receive the Jama attributes. Because the <<Jama_Failure Mode>> stereotype was made applicable to ActivityDiagram in Rhapsody and was included in the new mapping definition, the new activity was created with that additional stereotype and tag values ready to receive the desired Jama attributes.
Only two of the three Jama attributes (name and GlobalID) mapped in the Activity – Failure Mode (attributes) mapping have been populated in the SysML element because Cause of Failure was empty in the Jama Test_NewFeature failure mode element.Modify the new Jama Failure Mode Test_NewFeature
Open the Jama Failure Mode Test_NewFeature from the Syndeia dashboard or the SysML model and add a Cause of Failure, like that shown in Figure 8. Save the change.
Figure 8 Jama failure mode, showing added Cause of Failure
Compare across the new connection, the one with attribute mapping
In the Syndeia dashboard, Connection Browser tab, find the connection from J4::Test_NewFeature.
Right-click and choose Compare Source & Target
The Comparison Result tab should show a discrepancy in the source field, like that shown in Figure 9.
Figure 9 Syndeia dashboard, Compare Results tab
On the top row of the Comparison Result table, right-click and choose Sync Target-> Source
When the sync is complete, the diff table should be solid green, with the Cause of Failure written to the source tag in the SysML element