Syndeia 3.3 (Plugin for MagicDraw)
Tutorial Exercise 5.7
Creating Custom SysML – DOORS NG Mappings
| 47 Perimeter Ctr E, Suite 410 |
...
Objectives
The new learning objective of this exercise is to create new SysML_DOORS NG 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
...
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 DOORS NG interface, correctly installed with a valid license for user.
The user can use any DOORS NG repository they have available with the ability to create and edit elements within a DOORS project. This exercise's instructions uses DOORS artifacts and projects that we have available, but you will need to modify them to work with yours. Complete Exercise 5.6 on adding DOORS artifacts to the Model Types list first. 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_DNG_Mapping_Tutorial.mdzip provided with the tutorials for this exercise, which loads the profile Syndeia_MappingsMapping_TutorialTutorials_Profile.mdzip. We also use the syndeia33Tutorial.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.
Exercise
...
If not still open from the previous exercise, open the SysML project Syndeia_
DOORS_NGDNG_Mapping_Tutorial.mdzip, right-click the DOORS_NG_Mapping package, and launch the Syndeia dashboard. Select a Syndeia Cloud project, if necessary.
Go to the Mappings tab.
This exercise assumes you created a DNG artifact type Requirement (UAV) in the previous exercise.Anchor _Hlk501357103 _Hlk501357103 The first task will be to create a new mapping using this artifact type.
Right-click SysML-DOORS NG under Mapping Groups in the left column and select Add Mapping.
Edit the Mapping characteristics
Change Name to Reqt - Reqt (UAV) no attributes.
Change Description to SysML Reqt - DOORS Reqt (UAV) with no attributes.
Change Source Artifact Type to Requirement, using pull-down menu
Set Target Artifact Type to Requirement (UAV), using pull-down menu
Set Structure Level to NO_CHILDREN, using pull-down menu
Set Include Attributes to Exclude Attributes, using pull-down menu
Click Save Mapping at bottom.
The window should look similar to Figure 1.
...
...
Figure 1 Syndeia dashboard, Mappings tab, Adding Mapping to SysML-DOORS NG Mapping Group
Use the new Mapping you just created
Go to the Connection Manager tab. Open your SysML model in the left column and yours DOORS NG repository in the right column. Select Model Transform in the center.
Drag the Reqt_Environmental requirement in the SysML model into a project or folder in DOORS NG (Custom Transforms in this example).
...
Figure 2 Connection Manager while creating new DOORS NG Collection with new mapping
A small pull-down menu will appear on the Syndeia dashboard, as Figure 2, showing the possible mappings available for a SysML requirement dragged into DOORS NG.
Select Reqt – Reqt (UAV) no attributes and click OK. Expand the destination folder (Custom Transform in our example) on the right side of the Connection Manager. Check that a new DOORS NG requirement has been created.
Note: other mapping options might be available but might not work properly with the Unmanned Aerial Vehicle project. As stated in Exercise 5.6, it is good practice to confine the DOORS model types and mappings to a DOORS NG project within a specific mappings file.
The next task is to create another new mapping, this one with attributes shared between the SysML and DOORS NG 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 Reqt – Reqt (UAV) no attributes under Mapping Groups/SysML – DOORS NG in the left column and select Clone Mapping
Initially, the window should appear similar to Figure 3.
Figure 3 Syndeia dashboard, Mappings tab, cloning a mapping in the SysML-DOORS NG Mapping Group
Modify the Mapping
Change Name to Reqt - Reqt (UAV) attributes.
Change Description to SysML Reqt - DOORS Reqt Spec (UAV) with attributes.
Keep Source Artifact Type as Requirement and Target Artifact Type as Requirement (UAV).
Set Structure Level to CHILDREN_RECURSIVE, using pull-down menu.
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 4. Expand Syndeia Mapping Tutorial – Custom Stereotypes, select DOORS_Requirement and click OK. This choice will appear in the Stereotypes box.
Figure 4 Syndeia dashboard, Mappings tab, modifying the cloned mapping, part 1
Click the Retrieve Available Attribute Definitions button below the Attribute Definition Mappings table.
Click the plus box below the Attribute Definition Mappings table.
In the new row, select Identifier on the right (Target) side of the table, using the pull-down menu
In the new row, select Id [owner: Stereotype (Requirement)] on the left (Source) side of the table.
Repeat steps ix through xi for Primary Text and Created On. The final table should look like Figure 5.
- Click Save Mapping at bottom of right side.
...
...
Figure 5 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 DOORS NG repository you used above in the right column.
Drag the Reqt_Environmental DOORS NG created earlier into the empty SysML DNG4 package.
A small pull-down menu will appear on the Syndeia dashboard, as in Figure 6, showing the possible mappings available for a collection dragged into SysML.
Select Reqt – Reqt (UAV) attributes and click OK.
...
...
Figure 6 Connection Manager while creating new SysML Activity with cloned mapping
A new requirements hierarchy should appear under DNG4 on the SysML side. It will have the <<DOORS_Requirement>> stereotype in addition to <<requirement>> and all the tag values associated with those stereotypes (see Figure 7).
...
...
Figure 7 New SysML requirements created by cloned mapping
Edit the Reqt_Environmental SysML requirement in package DNG4 by adding a string (e.g. The system shall be greater than 95% recyclable) to the Text tag value. Return to the Syndeia dashboard, Connection Browser tab, and find the connection between DNG4::Reqt_Environmental and the 1848 – Reqt_Environmental requirement in DOORS. Right-click and select Compare Source & Target. The Comparison Result shows the added text on the SysML side in red (Figure 8).
...
Figure 8 Comparison Result after deleting SysML requirement Reqt_Environmental
On the same connection, select Sync Source -> Target. The comparison results now should show the SysML text transformed to the Primary Text on the DOORS NG side.