Manual Import-Export XMI
Applies to: CentraSite SP1
Summary: Import-Export XMI is a plug-in for CentraSite Control to support importing and exporting from/to XMI. This document describes step by step, how to install and to use this plug-in.
Table of Contents
1 Introduction 2
2 Installing the plug-in 2
3 Using the plug-in 5
3.1 Export to XMI 5
3.2 Import from XMI 6
4 Tutorial 10
4.1 Introduction 10
4.2 Steps 11
Related Documents and Links 22
1 Introduction
CentraSite Control offers a pluggable architecture that allows you to extend the standard graphical interface by adding your own features. (More information here). XMI is an XML-Standard to exchange information between MOF-based meta models.
The plug-in introduced in this document (Import-Export XMI) uses the pluggable architecture of CentraSite Control and extends it with following functionalities:
· All types including the respective relationships defined in CentraSite can be exported as XMI.
· Types and taxonomies specified in an XMI-file can be imported into CentraSite.
This document shows you how to install and use the plugin. Furthermore, a step by step tutorial will explain how the Import-Export XMI can be used to perform MOF-based metadata exchange with the common used UML-tool Enterprise Architect.
2 Installing the plug-in
Install the plug-in as mentioned bellow:
1. Download the Archive ImportExportXMI.zip.
2. Unzip the content of the ZIP file into the folder of Software AG Common Tomcat. This folder is normally located in Documents and Settings\AllUsers\ApplicationData\SoftwareAG\Tomcat\<version>\webapps\PluggableUI, where <version> identifies the current product version.
3. Restart the Software AG Common Tomcat service in Computer Management. To open Computer Management right click on My Computer and select Manage.
- If all went well, you should determine following modifications in CentraSite control:
· The add Asset dialog includes a new entry: UML Model.
· The topic Administrations is extended with a new sub topic: XMI Model Export.
· The About CentraSite > Plugins dialog in CentraSite Control contains a new entry representing the installed plug-in.
3 Using the plug-in
3.1 Export to XMI
Perform the following steps to export all types of CentraSite and their respective relationships to XMI.
1. In CentraSite Control navigate to Administrations > XMI Model Export.
2. Click on the XMI Export button.
3. After a few seconds a File Download dialogue pops up.
4. Download the archive by clicking on save.
The archive XMIModel.zip includes the results of the export as XMI file.
Now, you can import the XMI file in a UML-tool, which supports importing meta-models from XMI (e.g. Enterprise Architect). For more information see chapter 4.
3.2 Import from XMI
After importing data from XMI into a UML-tool, you will be able to perform modifications in the UML-Model, which represents the data-model of CentraSite. Thereafter you can export your model to XMI (if supported by the used UML-tool) and import the resulting XMI-file into CentraSite using Add Asset > UML Model. The importer analyzes the XMI-file line by line and accordingly updates the CentraSite data-model.
/ The current version of Import-Export plug-in supports the following modifications in the model:1. Creating new taxonomies.
2. Creating a new type with some attributes* from scratch.
3. Adding new attributes* to an existing type**.
All other performed modifications will be ignored while importing from XMI.
* New attributes must be one of types: xs:string, xs:boolean, xs:duration, xs:date, xs:integer or xs:anyUrl. These will become attributes of type String, Boolean, Duration, Date, Number, URL / URI respectively, in CentraSite.
** If the type already has at least one attribute.
/ Importing data from XMI will possibly change the data model of CentraSite. Hence, we recommend you to make a backup of your registry before starting the import process. How to do this is described here.
Do the steps below to import an XMI-file into CentraSite:
1. In CentraSite Control navigate to Asset Catalog > Browse.
2. Click on Add Asset(s) button.
3. In Add Asset dialog choose the radio button Add new assets using an importer and select UML Model. Continue the dialog by clicking Next.
4. Specify the path of XMI-file and trigger the import by clicking finish.
5. Once the import process is done, an import-log will appear on the screen.
/ If you get the error message “INMJRE0074: Trying to use a closed connection ...”, close the error window and trigger the import again by clicking finish./ Please notice that the import process can take several seconds. The higher the number of new types and attributes, the more time the import process requires.
4 Tutorial
4.1 Introduction
This tutorial explains how the Import-Export XMI can be used to perform MOF-based metadata exchange with the commonly used UML-tool Enterprise Architect. The objective of the tutorial is to offer a guide describing how
· to export the data model of CentraSite to XMI
· to import the resulting XMI into Enterprise Architect
· to perform some modifications in the UML model within Enterprise Architect
· to export the UML model to XMI
· to import the XMI file back into CentraSite control.
/ This tutorial supposed to be applied on Enterprise Architect 7.1 and CentraSite 8 SP1. Using different versions than the mentioned ones could lead to some differences especially with respect to screenshots.4.2 Steps
1. Exporting the data model of CentraSite to XMI: Export the data model of CentraSite as described in section 3.1.
2. Importing the data model in Enterprise Architect:
· Start the Enterprise Architect.
· Create a new project (ctrl + n opens the New Project dialog).
· Navigate to the Project Browser. In the context menu of Model select import model from XMI.
· Specify the path of the XMI file and trigger the import by clicking on Import button.
· The imported model must have a similar structure as shown below. Please take into account that the name of types (Application, Application Server etc.) can differ from the screenshot below, depending on your current data model.
3. Investigating the UML model: You can investigate your model in a class diagram. To do it, right click on CS_Package and choose Add > Add Diagram. Choose Class from Diagram Types and click on OK. Types can now be visualized by “drop and drog” into the created class diagram.
4. Performing modifications in the model: Now let’s do two minimal modifications in our model.
· Creating a new type: In Project Browser right click on CS_Package and select Add > Add Element. Type myType in the Name field and click OK. Under Details click Attributes. Specify a new attribute as shown in the screenshot below. Click Close to finish the dialog.
· Adding a new attribute to an existing type: In Project Browser double click on type Application. Under Details click on Attributes and specify a new attribute as shown below.
5. Exporting the UML Model to XMI: From the context menu of Model select Export Model to XMI. Specify the target XMI-file and make sure that the XMI version 2.1 is selected. Click Export to trigger the export process.
6. Importing the XMI file into CentraSite:
· Start CentraSite Control in a browser. Navigate to Asset Catalog > Browse and click Add Asset(s) button.
· In Add Asset dialog choose the radio button Add new assets using an importer and select UML Model. Continue the dialog by clicking Next.
· Specify the path of XMI-file and trigger the import by clicking finish.
· Once the import process is done, the import-log will appear on the screen.
7. Verifying the import’s results: In CentraSite Control navigate to Administration > Types. The types of CentraSite are listed in the Asset Types table.
· Type created from scratch (myType): The added type (myType) should be listed in Asset Types tables now. Click on it to see its attributes.
· Modified type (Application): Click on type Application in Asset Types table to open the Asset Type Detail window. The type will have a new attribute (comment), which is imported from XMI.
/ Because of some caching matters, it’s possible that the modifications are not shown in the Asset Type table immediately after the import process. However, logging off from CentraSite control and logging on later will refresh the content of Asset Type table.Related Documents and Links
The CentraSite Control Pluggable Architecture
http://documentation.softwareag.com/webmethods/soal8/dg-plug/overview.htm
Step by Step guide: how to use the pluggable architecture to define and install your own plug-ins
http://documentation.softwareag.com/webmethods/soal8/dg-plug/tutorial.htm
The CentraSite Administrator - Backing up the Database
http://documentation.softwareag.com/webmethods/inm/admin/backup.htm#backup
XMI
http://www.omg.org/technology/documents/formal/xmi.htm
Enterprise Architect
http://www.sparxsystems.com/products/ea/index.html
10