Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Cannot handle Associations between UML Stereotypes
icon5.gif  [ATL] Cannot handle Associations between UML Stereotypes [message #538088] Fri, 04 June 2010 17:28 Go to next message
Helko Glathe is currently offline Helko Glathe
Messages: 55
Registered: July 2009
Member
Hello,

I'm working on an ATL transformation where the target model is a UML model with an applied UML Profile.

The Stereotypes of that Profile do not only have simple typed Properties, but are also interrelated with each other. E.g. Stereotype1 has an association to Stereotype2.

Comming to the problem:

Assuming that the ATL Transformation has 2 matched rules (Rule1 and Rule2).

In both rules the target element is an UML Class (umlClass1 in Rule1 and umlClass2 in Rule2).

Both Rules also have a do section where the Stereotypes will be applied using applyStereotype. So, Stereotype1 is applied on umlClass1 and Stereotype2 is applied on umlClass2.

Now the problem is, that Stereotype1 has an association "refToSte2" to Stereotype2.

How can I get the Stereotype Application of umlClass2 in the do section of Rule1 to set the "refTo2" association on the Stereotype Application of umlClass1?

In addition there is no pure UML association between the 2 generated UML classes. The association is only on Stereotype Level.

I have also tried to get the umlClass2 in Rule1 using the resolveTemp() function, but the retrieved UML Class seams to be not ready at this time (debug: OUT!<unnamed>:UML!Class). The name attribute is not set and the getAppliedStereotypes() function gives an empty Set, but I have applied the Stereotype2 on umlClass2 in the do section of Rule2.

Does anyone have an idea how to solve this problem?

Many thanks in advance, Helko




[Updated on: Fri, 04 June 2010 17:32]

Report message to a moderator

Re: [ATL] Cannot handle Associations between UML Stereotypes [message #538610 is a reply to message #538088] Tue, 08 June 2010 04:16 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 522
Registered: July 2009
Senior Member
One solution would be to do that in two steps :
- first you create the classes and the stereotypes.
- then you link the stereotypes
This would lead to two combined ATL transformation.

You can also have a look here where I explain a solution to apply stereotypes in a declarative way. Using this solution you'll be able to do everything in only one transformation using resolveTemp as you did earlier.
Previous Topic:[ATL] Problem about a Rule with two Input Models and one output Model
Next Topic:[ATL] How to execute many rules in the same atl file
Goto Forum:
  


Current Time: Fri Jul 25 19:07:18 EDT 2014

Powered by FUDForum. Page generated in 0.01529 seconds