Archive for March, 2008

Creating a model template in Rational’s modelling tools

Wednesday, March 26th, 2008

When starting a new model I seldom want to start from a blank canvas; instead I’d like to use a template to get us going. Within RSA/RSM there are already some templates provided, and whilst useful, they are (necessarily) very generic.

A simple way to enable this is to create a model from an existing model from the New UML Model wizard page.

New UML Model from an existing model (page 1) New UML Model from an existing model (page 2)

Whilst this approach is workable for an ad-hoc approach to copying models, it’s far from ideal, especially in an environment where you would like your modelling team(s) to be using a consistent set of templates. A better approach would be to hook into the “Create model from standard template” mechanism. Whilst this isn’t particularly difficult to do, it doesn’t appear to be that well documented, with the only reference I found being a support page relating to RSA v6 (which is using an export wizard that doesn’t appear to be available in v7).

The way it’s done is by creating an Eclipse plug-in with an extension of the “com.ibm.xtools.modeler.ui.wizards.template” extension point. Under this extension you specify a directory which contains the model to be used as a template, an image to be used in the wizard page and a template definition file that pulls the whole thing together and provides some descriptive text.

Since I think that it’s likely that it’s likely there are people out wanting to do this who are not Eclipse plug-in developers, and in fact may not even be a developer (in the case of business analysts, for example). I’ve decided to write an article that goes through it in a lot more detail. Trust me, it’s simple, and you won’t need to write a single line of code. ;-)

Article: Create an RSA model template