Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[henshin-dev] Transforming UML2 Instance Models

Hi,

we got a request regarding how you can transform UML2 instance models with Henshin. Based on an example UML model, I sketched a Henshin rule which does some basic operations on an instance model. You can find a screenshot in the attachment.

The rule matches two classes and one instance of the first class. It sets the attribute "prop" of the first instance to the string literal "test". The rule also creates an instance of the second class and a reference (an instance of an association) between them.

I have not actually tried to execute this, but the modeling should work more or less as shown in the example. The syntax for transforming UML model is of course more verbose, but it is also more powerful (e.g. it allows you to transform the metamodel and instance models at the same time).

If you have comments or questions, please ask us on our mailing list.

Cheers,
Christian

Attachment: umlexample.png
Description: PNG image


Back to the top