Import Microsoft Visio diagrams into IBM Rational Software Architect: Part 1. Overview of the new Visio Import feature introduced in Version 8.5

IBM Rational Software Architect 8.5 introduced a new feature for importing Microsoft Visio diagrams, which automatically migrates Visio drawings to first-cut models in Rational Software Architect. Then these can be evolved and matured in a more formal and precise fashion. This helps you avoid much of the manual effort and the error-prone nature of this activity. While importing, the tool creates the semantic, as well as the visual model and makes attempts to preserves the visual aesthetics of the diagram by mimicking the visual layout and positioning of different elements. In this first article in a three-part series, Kapil Gambhir explains the capabilities and value of this feature and describes some of the decisions that occur during the import process.

Share:

Kapil Gambhir (kgambhir@in.ibm.com), Senior Software Engineer, IBM

author photoKapil Gambhir is a software architect on the Rational Software Architect team in the IBM India Software Labs. He has diverse and deep experience in IT services, product development, application development, and research-driven initiatives. Kapil is passionate about disruptive technologies and web technology in general. He also loves reading and listening to music.



05 February 2013

Introduction

The Visio diagram Import feature introduced in Version 8.5 helps you easily migrate from Microsoft Visio to IBM® Rational® Software Architect to meet enterprise-level modeling needs, without losing the information in your Visio diagrams. This migration will help you take advantage of the wide-ranging model-driven development capabilities and capitalize on the scalability provided by Rational Software Architect.

Semantically correct

Pure diagramming lacks the rigor and precision of formal modeling. Diagrams are easily adoptable with low entry barriers because they don't require the exactness of models. It is difficult for machines (and, at times, a different human looking at the same diagram) to infer the intended semantics of the drawing, because it does not convey much about the precise meaning.

For formal modeling tools, the precision and the rigor that are part of their value become deterrents to using them easily. It takes a fair amount of knowledge and experience with the tools to understand the exactness of the constructs and use them appropriately.

Some think of this as a forced hardship. However, it is actually a measure that provides the impetus to think more precisely and capture situations in a realistic way, rather than promoting shortcuts. Enterprises deal with complex problems and need to reflect that problem statement precisely. This need for precision demands an equally strict and precise set of constructs to reflect those real-life scenarios.

As a tool for IT modeling, Rational Software Architect helps in this endeavor. Now it provides an automated capability to migrate Microsoft Visio diagrams into Rational Software Architect as domain models.


Scope of the Visio Import feature

This feature supports one-time import of Microsoft Visio diagrams into Rational Software Architect. It does not require an installation of Visio for the import.

This section outlines the scope and the specifics of what the initial version of this feature does.

Visio version and editions supported

There are multiple versions of Microsoft Visio and multiple editions of the same version, such as Standard, Professional, and Premium. Rational Software Architect supports the Microsoft Visio 2010 version, and the import feature works with any of the editions for that version.

Types of diagrams supported

From the current set of templates and domains supported by Visio, the following type of diagrams are supported in the Rational Software Architect 8.5 release:-

UML class diagram
Captures the classes and their relationships
 
UML use case diagram
Captures the use cases and their relationships with actors
 
Network diagram
Broadly, captures the computing elements and their networking relationship

The first two are UML specification-driven. Thus, they have a natural target in Rational Software Architect as a UML model. Network diagrams are captured as topology models.

File formats supported

Diagrams created in Visio can be persisted in multiple file formats. Visio has a default proprietary binary file format (.vsd), in which diagrams are stored. Rational Software Architect supports the platform-agnostic Visio XML format, which uses a .vdx extension (VDX hereafter). Within Visio, you can choose .vdx as the default format for saving files also.

Considering the backward compatibility of the Visio XML schema, files from older versions of Visio might work without any change.

For the class diagrams, an XMI (XML Metadata Interchange) file is required in addition to the Visio XML, because the XML file has the required semantics. It can be generated by using the macro that is supplied with Microsoft Visio (see Part 2 in this three-part series for more details).

Fidelity of information imported

The core value of the import feature is what information is imported to Rational Software Architect. For any model, there are two important perspectives:

  • One is the actual semantics (usually referred to as the semantic model) that communicate the exact semantic for the elements.
  • The second is the visual perspective that visually captures a subset of elements in different diagrams.

Although the Visio Import feature creates the semantic model, it also makes a best-effort attempt to preserve the visual aesthetics. The diagram typically conveys additional semantics to the user, based on visual cues, and that is preserved when the information is imported into Rational Software Architect.

From the semantic perspective, between the two types of diagrams supported (UML and network), UML is largely driven by specifications. Therefore, mapping Visio elements to the Rational software naturally aligns the specs. In contrast, because network diagrams are not specification-driven and are largely driven by the type of elements present in the real computing world, there are instances where the import doesn't find a suitable match in topology diagram, so it captures these instances as Sketcher elements.

In capturing ideas and thoughts through notational elements (no semantics attached), the Sketcher component supports evolving those elements as the desired target domain element. This is useful because any element that didn't find its desired target domain element during the import process can still be morphed to the desired target later.


Highlights of the import feature

To improve the usability and make the import process more informative, the overall user experience has been enhanced. The following capabilities, which are applicable for all diagrams, are included with the import process.

Report

Importing the Visio diagram is largely an automated process that executes a certain set of rules and makes certain decisions, based on the content found. To reveal those decisions and provide more insight into what happened "under the hood," an HTML-based report is created.

The report is in a table format, with hyperlinks to navigable content. The information descends from the top table, which contains document-level information, to the lowest level, which includes elements.

Figure 1. Sample report for Visio import
Screen capture of a sample report

Internal decisions are classified into three categories:

  • Information (all messages)
  • Warning (warning and error messages)
  • Error (only error messages)

You can control their creation in Preferences. Severity information serves as a good visual indicator when looking at the report.

ToDo markers

For certain decisions and states of the final imported element, the process creates manual ToDos (visible in Task view) as a mechanism to facilitate user intervention. This is a list of items where the import could not find a perfect match or the desired domain element, so the markers flag those cases for you.

Figure 2. Sample ToDos listed
Screen capture of two sample ToDos created

You can double-click these ToDos to navigate to the respective element in a diagram or model. Like the regular ToDos, you can click the check box to mark them finished and knock them off the list whenever you choose. Creation of ToDos is controlled by Preferences, so you can switch the option On or Off.

Ambiguity resolution

As a diagramming tool, Visio works well for human eyes, but when a machine diagnoses the same file, there are certain scenarios that will not match the visual semantics. They are categorized as ambiguous scenarios. As an example, when a connection is made between two elements, the connector can be dropped before properly connecting to the desired element. When reflected in the file, these associations would not exist, but humans can see the intended association in the diagram.

For these types of instances, wherever the import process can find the intended element, it resolves the ambiguity with a built-in algorithm. As an example, for the aforementioned case, where the connection between the two nodes is not made properly, it finds the best possible match of the intended target node and makes that association, so that it is correctly reflected in Rational Software Architect.

Similarly, the UML class diagram import process reconciles the XMI and VDX files. This reconciliation is required to tie the visual element to the semantic element, and it can create certain ambiguities, which are handled to the extent possible.

Control through Preferences

In Preferences, you can tweak the behavior of the Visio import. These options for settings help in fine-tuning certain aspects of the import process.

Figure 3. Preferences available in the Visio Import view
Layout, Report and ToDo preference options
Layout
You can use the two options here to resize the whole diagram by a certain factor. Usually, elements such as classes, drawn in Rational Software Architect, take more real estate. Because we strive to preserve the spatial coordinates of individual elements, the elements tend to overlap with each other. This option enables stretching the diagram. This action is synonymous with zooming in, without losing the relative spatial coordinates.
 
Report
Use this group of preferences to decide on the generation of the report, as well as the level of information produced in the report.
 
ToDo markers
Use this simple check box to activate or deactivate creation of create ToDo markers.
 

There are additional preferences applicable to specific domains. Subsequent articles in this three-part series explain those.


Installation of the feature

To install it, you need to select the Visio Import feature under Rational Software Architect within the IBM Installation Manager (see Figure 1). It is divided into two parts, based on the target domains:

  • Visio import for UML diagram
  • Visio import for network diagram
Figure 4. IBM Installation Manager with Visio options highlighted
Visio import of UML, network diagrams highlighted

The UML diagram import is grouped with the core UML capability, and the network diagram import is clubbed with the topology model capability, as they are the target domains, respectively.


Summary

You can now use Rational Software Architect to migrate Visio diagrams to Rational Software Architect models. This enables a more formal and precise approach to modeling. The software also Version 8.5 also offers usability refinements that make the import more transparent and provides certain controls to tweak the process.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=857155
ArticleTitle=Import Microsoft Visio diagrams into IBM Rational Software Architect: Part 1. Overview of the new Visio Import feature introduced in Version 8.5
publish-date=02052013