Archive for the ‘UML’ Category

Filling the void

September 6, 2010 11 comments

The search…

As Andreas blogged a while ago, we at itemis are working on a requirements editor as part of a public research project. Developing a full-fledged requirements management tool is not in the scope of the project. What is of interest is to have a solution to enable traceability from requirements to design, all the way to source code. Looking around for an eclipse based open source solution for requirements management, we realized that this space is currently empty (except for ORMF which somehow didn’t fit our needs or give us confidence).

Having decided to move on with a solution of our own, the next step was to shop for a suitable meta-model for requirements. We weren’t quite unlucky as before here. We had two choices here, SysML or RIF.

SysML or RIF (now ReqIF)

SysML is a general purpose modeling language for systems engineering applications. RIF on the other hand is an interchange format for exchanging requirements between partners. Although SysML and RIF can capture requirements, we found RIF more apt for our needs, as its scope is limited to requirements management. Currently, RIF is up for standardization at OMG with a new name ReqIF.

RIF offers a schema based XML format as well as its UML meta-model in Enterprise Architect. To add to our confidence in RIF, IBM had already incorporated an importer/exporter for the RIF in IBM Rational DOORS . Several other companies, like MKS, are also working on an implementation of the RIF specification.

Bringing RIF to Eclipse world

The first step in building some tooling around RIF was to bring it into an eclipse compatible meta-model. Naturally, the first choice was Ecore, the now de-facto eclipse meta-model. However, converting RIF from an Enterprise Architect format to a Ecore XMI was a herculean task. After failing to do the conversion with the steps I detailed here, we went on a journey of export-import-export from tool to tool and finally had a RIF compatible Ecore meta-model.


The RIF Model

The RIF model is a generic requirements meta-model. (From another perspective, too generic to be called a requirements meta-model). The meta-model allows to define requirement types and requirement objects, fitting one of those types. Take for instance, a typeFunctional Requirement” with attributes such as “ID“, “Name” and “Status“. You could use RIF to create a SpecType named “Functional Requirement” with matching AttributeDefinitions for “ID“, “Name” and “Status” . The AttributeDefinitions could also have DatatypeDefinitions. Based on the defined SpecType you could create SpecObjects having AttributeValues for all the AttributeDefinitions.

This is a birds-eye view of the RIF meta-model.

The Editor

We retained the generic nature of RIF in the editor as well. To start with, you could create type specifications using a tree based editor.

Based on the type specifications, the editor at runtime creates an eclipse forms based user interface, lays it out neatly and lets you edit your requirements. As you could see below, the editor creates a tree to display the requirement hierarchy on the left. On the right, the editor lets you edit the requirement attributes by creating matching UI elements to handle the basic datatypes like StringIntegerEnumeration etc.  you created during RIF type specification using the tree editor.

Editor Extensions

You could easily build extensions to the editor using the provided extension points. If you need a specific UI behavior, you could define a new complex datatype and build UI customizations for this complex datatype.  For example, we extended the basic editor to have an embedded DSL editor (using Xtext) to capture detailed requirements.


The RIF editor loads and writes out XML conforming to the RIF schema.

Filling the void

We aren’t quite there yet. We, of course need more community interest and support to take this forward. Once we do, we hope to fill the void completely and have an open source solution for requirements management.


Converting Enterprise Architect Model to EMF UML2 model

February 11, 2010 23 comments

Recently, I had a task of a converting a UML model in Enterprise Architect to a EMF UML2 model. Googling with the keywords took me straightaway to Ueli Brawand and his tool EA_UML2Exporter. It is a wonderful little tool that works with openArchitectureWare and gets the task done in no time. However, setting it up does consume some time. I thought of summarizing the steps I did, incase it helps others.

1. Downloading Enterprise Architect

  • If you don’t have Enterprise Architect, download a 30-day trial from here:
    Please note that Enterprise Architect runs only on Microsoft Windows. If you are using other environments, please use a virtual Windows environment to install Enterprise Architect.

2. Downloading openArchitectureWare

3. Downloading EA_UML2Exporter

4. Setting up a new openArchitectureWare Project

  • Start the downloaded Eclipse distribution with oAW and create a new openArchitectureWare Project.
  • The EA_UML2Exporter libraries needs to be added to the project. Select Project Properties from context menu and add the EA_UML2Exporter JARs using Java Build Path -> Libraries ->  Add External JARs….
    Adding external Jars
  • The EA Java API library now needs to be added to the project in the same way. Browse to the Java API folder within Enterprise Architect Installation folder and add eaapi.jar to the project in the same way as above.
  • SSJavaCOM.dll within the Enterprise Architect Java API folder needs to be in the system path. Easiest would be to add this to the root of the newly created project.
  • Open MANIFEST.MF and add the following plugin dependencies:







Plug-in Dependencies

  • Copy the to be converted Enterprise Architect EAP file to the src folder.
  • Create an empty file called model.uml within the src folder.
    This would be your converted UML2 model after the workflow is run.
  • Within this src folder create a workflow file (workflow.oaw) with the following content:

<?xml version=”1.0″ encoding=”UTF-8″?>


<property file=“”/>

<bean class=“oaw.uml2.Setup” standardUML2Setup=“true” />

<!– Metamodel-Definition –>

<bean id=“EmfMM” class=“oaw.type.emf.EmfMetaModel”>

<metaModelPackage value=“org.eclipse.emf.ecore.EcorePackage”/>


<bean id=“UmlMM” class=“oaw.uml2.UML2MetaModel”/>

<component class=“oaw.uml2.toolsupport.ea.EA_Xmi2Exporter” >

<EapFile value=“${project_root}${ea_file}” />

<ModelFile value=“${model_file}” />

<PackageName value=“${model_pkg}” />

<Cleanup value=“true”/>



  • Within this src folder create a workflow properties file ( with the following content:

project_root =

# EA filename

ea_file =

#Output UML2 filename

model_file =

#Package within EA Model

model_pkg =

  • Fill in the missing values in the properties file.
    project_root: You could leave this empty
    ea_file: EAP file to be converted
    model_file: UML2 model to be created
    model_pkg: Package within EAP file to be converted (this could be the root package, if you want the whole file to be converted) 

    The properties file might look, for example, as below:

project_root =

# EA filename

ea_file = src/2006-10-04 RiF-Meta-Modell_v1.1_PUBLIC.EAP

#Output UML2 filename

model_file = src/model.uml

#Package within EA Model

model_pkg = RIF/ExchangeFile

  • If the project is setup correctly, it would look like this:
    oAW Project

5. Running the openArchitectureWare workflow

  • Run the workflow by selecting the workflow file (workflow.oaw) and choosing Run As -> oAW Worlflow from context menu.
  • Enterprise Architect would now be started in the background.
  • If the conversion is successful you would get a console output similiar to below:

0    INFO  WorkflowRunner     – ————————————————————————————–

0    INFO  WorkflowRunner     – openArchitectureWare 4.3.1, Build 20090107-2000PRD

0    INFO  WorkflowRunner     – (c) 2005-2008 and contributors

0    INFO  WorkflowRunner     – ————————————————————————————–

0    INFO  WorkflowRunner     – running workflow: workflow.oaw

0    INFO  WorkflowRunner     –

1281 INFO  CompositeComponent – EA_Xmi2Exporter

1281 INFO  EA_Xmi2ExportBase  – UML2Exporter for EA (1.7.0-SNAPSHOT)

1281 INFO  EA_Xmi2ExportBase  –   EAP-File   : src\2006-10-04 RiF-Meta-Modell_v1.1_PUBLIC.EAP

1281 INFO  EA_Xmi2ExportBase  –   Package    : RIF/ExchangeFile

1281 INFO  EA_Xmi2ExportBase  –   OutputFile : src\model.uml

70266 INFO  EA_Xmi2ExportBase  – Start XML2.0-output …

86891 INFO  EA_Xmi2ExportBase  – XML2.0-Export done.

86891 INFO  WorkflowRunner     – workflow completed in 85610ms!

  • model.uml file would now be the converted UML2 file.