Exercise 4.2 - Creating SysML - Windchill Mappings
Objectives
The new learning objective of this exercise is to:
add new model types and mapping groups
add new Windchill artifact types
add new Windchill relation types
create a new Windchill mapping that includes relations and part attributes.
Preparation
This exercise assumes the student has:
Cameo System Modeler 2022x (or MagicDraw with SysML plug-in) or later installed correctly on his or her machine with a valid license for use,
Syndeia 3.7.1 or later installed as a plugin for Cameo/MagicDraw with a valid license for use
Windchill interface, correctly configured with a valid license for use,
A Windchill repository network connection in the Syndeia Repository Manager.
Exercise
This exercise assumes the user has access to the SysML model Syndeia_Windchill_Mapping_Tutorial.mdzip (get it here - SysML Models, Profiles and Mappings). Open the model in Cameo.
Right-click on package Windchill_Mapping, launch the Syndeia dashboard, select a Syndeia Cloud project if required, and click on the Connection Manager tab. Click on Repository at the top of the left panel and select SysML Repository. Click on Repository at the top of the right panel and select the 'Windchill' repository. The dashboard should appear as in Figure 1.
In the Syndeia client dashboard, go to the Settings tab (Figure 2) and check the Use mapping element under the General heading, if not already checked. Click Apply.
Go to the Mappings tab in the Syndeia dashboard. If there is not a Windchill model type added already, we will go ahead and create one. Right click Model Types and select Add Model Type shown in Figure 3. Select the Windchill repository in the screen shown in Figure 4 and click OK to finish.
Right-click the Windchill model type and select Add Artifact Type a shown in Figure 5 below. Note: if a previous Windchill Part artifact type exists underneath Windchill artifact types, please delete it before adding the new 'Part' artifact type.
A new window appears, ‘Add Windchill Artifact Type' as shown in Figure 6. Select your repository in the first dropdown menu and then select a Project (in our example ‘Sandbox’). Select 'Part’ from the Type dropdown. Lastly, input the Number/Template item of the artifact type from your Windchill repository and click Retrieve Windchill Artifact Type Properties.
You should see a list of all possible attributes as shown in Figure 7 below. Click ‘Select all’ to bring in the entire list and then click OK to finish. Note the isModifiable column is no longer shown checked for all values, and some values may already have BOOLEAN type selected. For any that cannot be modified by a user in Windchill, uncheck the isModifiable box. Note the type column has different options other than STRING. IF your attribute in Windchill has a different type, such as the boolean type, configure it accordingly. In this example, we have selected AssemblyMode, GatheringPart, Name, and Source to be used in the mapping.
Add new Windchill relation types as shown in Figure 8.
Right-click Windchill under Model Types and select Add Relation Type
A new window appears, Add Relation Type
Select the repository from the dropdown
Next, set the Type to OccurrenceLink in the dropdown
Click Ok to finish and close the window
Repeat the above steps to add relation type ‘UsageLink’.
If there is no Windchill Mapping group existing, right click Mapping Groups and Add Mapping Group shown below in Figure 9.
In the window ‘Create Mapping Group’, give the Windchill mapping group a name/description and select Windchill as the target model type as shown in Figure 10.
We will now create the first custom mapping that uses the 'Part Usage' relation. Underneath Mapping Groups you will see SysML - Windchill. Right-click the ‘SysML - Windchill’ group and select ‘Add mapping’ from the menu option.
In the window shown below in Figure 11, set a name and description reflecting the SysML and Windchill artifact type you are using along with any other information about the mapping you wish to preserve.
Set the Source Artifact Type to the Block and set the Target Artifact type to the Part.
Set the Structure level to CHILDREN_RECURSIVE and set Include Attributes to Include Attributes
For stereotypes, click the + button and add the Intercax Artifact stereotype from the Syndeia Mapping Tutorial profile
Further down in the mapping screen as shown in Figure 11, click the Retrieve Available Attribute Definitions button. Next, click the + button to the left and start mapping the attributes between SysML and Windchill. In this example:
assembly_mode → AssemblyMode
source → Source
gathering_part → GatheringPart
name → Name
Set Include Relations to Include relations in the dropdown. Use the + icon to map Part Property to UsageLink as shown in Figure 12. Click Save mapping to finish.
Right click the newly created ‘Block-Part Usage’ mapping and select Clone Mapping as shown in Figure 13.
Give this cloned mapping an updated name and description. Then repeat step 13 to create a relation mapping that uses the relation of type ‘OccurrenceLink’. Save mapping when finished.
Complete the next Windchill tutorial here: Exercise 4.3 - SysML to Windchill Model Transform with Mappings