Exercise 16.1 - SysML Artifactory Reference Connection
Objectives
The new learning objectives of this exercise are to create reference connections between a SysML element and an Artifactory element.
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 Artifactory interface, correctly installed with a valid license for user.
The user can use any Artifactory repository they have available with the ability to create and edit elements within a Artifactory 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 will use the provided MagicDraw project Syndeia Artifactory Tutorial.mdzip (get it here - SysML Models, Profiles and Mappings). For this demonstration, we use the Automotive Engineering project which contains an existing set of packages and artifacts, but you may use any existing elements in your Artifactory repository, instead.
Background – Artifactory
Artifactory is a digital artifact repository solution from JFrog Ltd. It is widely used to manage non-source code digital content, e.g. deployable software packages used in an organization. It contains Repositories, which contain one or more Packages, which contain Artifacts. The package structure can have multiple levels. Repositories, Packages, and Artifacts are all recognized by Syndeia and can be used in building inter-model reference connections.
Exercise
Open the SysML project Syndeia_Artifactory_Tutorial.mdzip (get it here - SysML Models, Profiles and Mappings) (or your own), right-click the Engineering Software Environment package, and launch the Syndeia dashboard (Figure 1).
Figure 1 Launching Syndeia dashboard
If Syndeia connections are set to store in the SysML model, the dashboard will open immediately. If they are stored in Syndeia Cloud (see Exercise 1.1), choose or create a project for the exercise.
Figure 2 Adding an Artifactory network connection
To connect to an Artifactory repository, right-click the Artifactory category under Repositories in the Repository Manager tab and select Add… (Figure 2), then enter a name, your own Artifactory URL and credentials, and click OK (Figure 3).
Figure 3 Entering Artifactory repository info
Your repository should load. Expand it to show Repositories, Packages and Artifacts, as in Figure 4.
Figure 4 Viewing Artifactory repository contents in Repository Manager tab
To create a reference connection between a SysML element and an Artifactory artifact, go to the Connection Manager tab on the Syndeia dashboard, as in Figure 5.
Expand the SysML model in the left pane to show the CFD 4.0 block.
Select Reference under Connection Type in the middle pane.
Select the Artifactory repository connection for the right-hand column and expand the Repositories folder to show the artifact to be connected, for example, CFD_4.0.pdf.
Drag and drop CFD_4.0 from the left pane on top of CFD_4.0.pdf in the right pane to connect them (or vice versa).
Figure 5Â Syndeia Dashboard, Connection Manager tab
To see the reference connections that have been created, go to the Connection Search tab on the Syndeia dashboard and click the Refresh button (see Figure 6).
Figure 6Â Syndeia Dashboard, Connection Search tab
The reference connections can be used in a number of ways by Syndeia. Close the Syndeia dashboard. To open an Artifactory element directly from MagicDraw, right-click on the CFD 4.0 block in the containment browser and select Syndeia → Open Connected Artifacts.. The Artifactory artifact CFD_4.0.pdf will be opened in the default web browser (see Figure 7). Note: your Artifactory user interface may appear different depending on your configuration settings.
Figure 7Â Artifactory web interface
The reference connection may also be used to detect changes across the connection. To demonstrate,
Make a change in the file CFD_4.0.pdf in the Artifactory repository through its web interface, e.g. create a new version of the pdf and deploy it.
Reopen the Syndeia dashboard. Go to the Connection Browser, expand to find the connection to CFD_4.0, right-click and select Compare Source & Target (Figure 8).
Figure 8Â Syndeia Connection Browser, comparison across new connection
The Comparison Result tab (Figure 9) shows a newer version of the Artifactory file is available. The reference connection can be updated by right-clicking on the red row and selecting either Sync Source to Target or Sync Target to Source.
Figure 9Â Syndeia Comparison Results tab showing a newer version of the Artifactory file available