Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Objectives

The new learning objectives of this exercise are

  • to browse and expand XML files in a GitHub repository,

  • to create a reference connection between an existing SysML element in MagicDraw and an existing XML element in GitHub,

  • to compare across the connection to see whether a later version of the XML element is available,

  • to sync a connection to the latest version of the in XML element.

Preparation

This exercise assumes the student has

...

The user can use any GitHub repository network connection they have available, with access to at least on Git repository, with at least one branch with one or more XML files and one or more commits. It is generally advisable to carry out these exercises in a non-production repository, a "sandbox", set up for training and practice purposes.

Exercise

  1. The Syndeia 3.3 interface allows the user to expand an XML file in GitHub and create a Reference Connection between an element in another repository such as MagicDraw and any element in an XML file in GitHub.

    Image RemovedImage Added

    Figure 1 Syndeia dashboard, Connection Manager tab, for creating Reference connection to XML elements in GitHub

  2. Open a test model in MagicDraw. Open the Syndeia dashboard by right-clicking a package in the containment tree and selecting Syndeia → Dashboard. Select a Syndeia Cloud project for the exercise, if necessary.

  3. Switch to the Connection Manager tab, open the SysML model (or other repository) in the left column and your GitHub in the right. Expand an XML file under Files in a GitHub repository branch to view the element structure. The final result should look something like Figure 1.

  4. Create a Reference connection between a SysML element such as ablock (or another repository element) and an XML element by selecting Reference Connection in the center panel and dragging the block (or other element) onto the desired XML element (or vice versa). For example drag the block XML Connect onto the product element in the catalog.XML file.

  5. Check the connection created in the Connection Browser or Connection Search tab (be sure to Refresh/Get All to see the latest). See Figure 2.

    Image RemovedImage Added

    Figure 2 Syndeia dashboard, Connection Browser tab, showing SysML repository after completing reference connection

  6. Right-click it and select Compare Source & Target (see Figure 5).

    Image RemovedImage Added

    Figure 3 Syndeia dashboard, Connection Browser tab, showing Compare command

  7. The Comparison Result tab should show something like Figure 4. The result is green, showing the connected version of the XML file is the latest. The Compare Source & Target operation in the case of a Reference connection does not look at the contents of the two models, only whether there is a later version of the same target element in a configuration-managed repository.

    Image RemovedImage Added

    Figure 4 Syndeia dashboard, Comparison Results tab, after completing Compare operation

  8. In the Connection Browser, right-click the connection and select Syndeia → Open Target as shown in Figure 5. This should open the XML file in GitHub. Edit the file (make a minor change) and then commit to create a new version and then return to the Connection Browser and compare again as shown before in Figure 3.

    Image RemovedImage Added

    Figure 5 Syndeia dashboard, Connection Browser tab, showing Open Target command

  9. The Comparison Result tab should show something like Figure 6. The result is red, showing a difference. The Compare Source & Target operation in the case of a Reference connection does not look at the contents of the two models, only whether there is a later version of the same target element in a configuration-managed repository.

    Image RemovedImage Added

    Figure 6 Syndeia dashboard, Comparison Results tab, after completing Compare operation

  10. To change the Reference connection to the latest version of the file on the same branch, go to the Syndeia dashboard, Connection Browser, right-click the connection, and select Sync Source → Target. Now use Compare Source & Target to check that the SysML block is connected to the latest version of this file on this branch.