Using OCL to create a M2M ATL to UML2 [message #1775869] |
Tue, 07 November 2017 11:47 |
Jose Caldeira Messages: 1 Registered: November 2017 |
Junior Member |
|
|
Hi,
I'm starting learning ATL and OCL language. In my first homework, I've been asked to create an ATL to transform a Model that has an object called RequirementGroup and this one could have child Requirement. The main idea is that, in the transformation every RequirementGroup should be transformed into a Component and if the RequirementGroup has chil Requirement, then this one, should be transformed into an UseCase.
I've already done this rule:
-- creating components from RequirementGroup
rule ReqGroup2Components {
from
s: Req!RequirementGroup --( s.parent.oclIsUndefined() )
to
t: UC!Component (
name <- s.name
)
}
But what this does is only create a bunch of Components, and the hierarchy is gone :(
I've been reading, and it seems that I need to create something like packageElement, but i Really don't see how can I achive that.
Could you help me please?
Thank you,
|
|
|
|
Powered by
FUDForum. Page generated in 0.03202 seconds