Skip to main content



      Home
Home » Modeling » OCL » Using OCL to create a M2M ATL to UML2(Need help about OCL and how to create UML2 elements from a model wicht is not an UML Model)
Using OCL to create a M2M ATL to UML2 [message #1775869] Tue, 07 November 2017 06:47 Go to next message
Eclipse UserFriend
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,
Re: Using OCL to create a M2M ATL to UML2 [message #1775959 is a reply to message #1775869] Wed, 08 November 2017 10:23 Go to previous message
Eclipse UserFriend
Hi

This is an ATL question so you should ask on the ATL newsgroup.

It is not normal practice to do people's homework. so you may not get any response there either.

Regards

Ed Willink
Previous Topic:Valid OCL constraint - Validation Error in Editor
Next Topic:Can we capture Exception/Error Message from console in Finish block?
Goto Forum:
  


Current Time: Sun Jul 27 08:19:37 EDT 2025

Powered by FUDForum. Page generated in 0.04086 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top