The Model Driven Software Network

Raise your level of abstraction

Hi all,

At itemis, I’ve recently been working on a challenging prototype: the migration of Rational Rose UML models and diagrams to Topcased UML editor (

While open source (UML) solutions are becoming more and more trendy and mature, in particular in embedded systems area, technologies have still to prove their ability to adapt to existing legacy solutions. This is particularly true when trying to convince people to switch to open source!

Topcased is an IDE for critical systems; it includes a UML2 editor, based on Eclipse UML2 as underlying model and use UML Diagram Interchange concepts to store diagrams model.
On Rose side, the last IBM Rational product RSM allows to import Rose files and to export the model (without diagrams!) into UML2 format, more or less compatible with Topcased.
In this context the question was: is it possible to make a model transformation from Rose diagrams to Topcased diagrams? How much would it be, comparing to re-design every diagram by hand?

The prototype

The realized prototype is based on openArchitectureWare technologies.
It takes as input:
- the Rose ".mdl" file
- the UML2 model file (.uml) obtained from RSM
The outcomes are:
- the UML2 model file (.uml) slightly modified to comply with Topcased constraints
- the Topcased diagram model file (.umldi)

The scope of the prototype has been reduced to the migration of Use Case, Class and Sequence diagrams.

The Rose file is parsed thanks to an open source library CrazyBeans ( which provides an object tree representation of the Rose model.
Model transformations are done with Xtend, using three meta-models: the oAW JavaBean meta-model allowing to easily navigating through an object graph, the UML2 meta-model and the Ecore meta-model for Diagram Interchange.

The picture below shows an architecture overview:

The workflow is as followed:

1. Rational Rose model parsing thanks to CrazyBeans, being integrated as an oAW workflow component.

2. First Xtend transformation to create a “bridge” model between Rose elements and UML2 elements; the purpose of this intermediate model is to ease the navigation while creating the diagrams model.
For example, an object LifelineBridge is created for each lifeline of sequence diagram encountered in the Rose model, linking an InterObjView (Rose concept of lifeline), the UML2 Lifeline and the behaviors that will be attached on this lifeline. When creating diagrams model, each Lifeline will then offer easy access to the rose data, containing graphical information (location, size …) and to UML2 element we need to relate to.
This is illustrated in the picture below:

3. Second Xtend transformation to create diagrams model by navigating through the previously created “bridge” model. Issues of sizes, locations and scaling are managed in this transformation. For this, we use a nice Xtend feature which is to be able to call Java methods directly from Xtend expression language. This allows to write complex formulas and algorithms in Java, better suited for this task, and also to re-use layouts operation already developed in Topcased.

To give an overview of what it looks like, here are some lines of Xtend expressions:

The first operation create the root element "Diagrams" that contained all the diagram elements. For example, when doing diagrams.addAll(bridge.classDiagrams.typeSelect(model::bridge::ClassDiagramBridge).createClassDiagram(model)), we iterate on each ClassDiagramBridge, created during the first transformation, and call createClassDiagram to create the Diagram element, which will be in turn put as a contained object of the Diagrams root element.

This operation creates the Diagram element for the ClassDiagram, creating all the graph nodes/edges for each class and associations that have to be shown on the class diagram.

4. Save UML and UMLDI resources, using Topcased specific resource implementations (writers).

The results

Here are some screenshots giving an overview of the outcomes:

A class diagram in Rational Rose:

The same in Topcased:

A sequence diagram in Rational Rose:

The same in Topcased:


In conclusion, the prototype has been a success. Results were judged quite impressive considering the few days spent to do it. Topcased meta-models and APIs were open and comprehensive enough to be able to exploit them from "outside".
From a technology point of view, Xtend was a good choice for this use case. Indeed the power of expression language allows easy model navigation and creation, and the resulting prototype actually represents few lines of "code". Moreover for the tricky computing parts, it was possible to keep them in Java and even re-use existing APIs.

Views: 2194

Add a Comment

You need to be a member of The Model Driven Software Network to add comments!

Join The Model Driven Software Network

Comment by Leonardo Kenji Shikida on September 16, 2011 at 2:08
pretty impressive. How did you figured out how to generate sequence diagrams using crazybeans?
Comment by William El kaim on June 29, 2009 at 9:51
You should make it a real software and sell it. People should stop using rational Rose.
It is also may a good example of how to use openarchitectureware and could be a good open source project and tutorial for newbies.
Comment by Karsten Thoms on June 26, 2009 at 19:50
Hi Yannick! Thanks for sharing your experience about this interesting topic. I face sometimes questions about model transformations including diagrams. Without diagrams this is no big deal with current model transformation techniques like Xtend, but usually I do not recommend to try transforming also diagrams. You proved that with some experience this can be done nowadays. Especially Rose models are still around there in the industry and often not migrated. Maybe this changes now.



© 2019   Created by Mark Dalgarno.   Powered by

Badges  |  Report an Issue  |  Terms of Service