Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » cannot transform all suppliers in dependency
cannot transform all suppliers in dependency [message #1065401] Tue, 25 June 2013 14:57 Go to next message
Mahin Abbasipour is currently offline Mahin AbbasipourFriend
Messages: 24
Registered: June 2013
Junior Member
Hi,

I used this rule for dependency and the thing is that for some dependencies in the created output model, it transforms both clients and suppliers and for some, it only transforms clients. When I check with the debug, it shows the suppliers are not empty. Can any one guess what is wrong here?

has Stereotype is a helper which is defined before as follow:

helper context MM!Element def: hasStereotype(name : String) : Boolean =
not self.getAppliedStereotype(name).oclIsUndefined();

rule RelatedTo {
from s:MM!Dependency (s.hasStereotype('MyProfile::RelatedTo'))

to t: MM2!Dependency (
name <- s.name -> debug ('name'),

client <- s.client -> debug ('client'),
supplier <- s.supplier -> debug ('supplier')
),
tt: MM2! RelatedTo (base_Dependency <- t)

}
Re: cannot transform all suppliers in dependency [message #1065409 is a reply to message #1065401] Tue, 25 June 2013 15:29 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

What do you mean by "transforming clients and customers"?
Are the "client" and "supplier" only String attributes or rather references to other elements?
In the second case, if they are not transformed this probably means that you have currently no rule matching them in your transformation.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: cannot transform all suppliers in dependency [message #1065422 is a reply to message #1065409] Tue, 25 June 2013 16:07 Go to previous messageGo to next message
Mahin Abbasipour is currently offline Mahin AbbasipourFriend
Messages: 24
Registered: June 2013
Junior Member
Each dependency has two properties which shows the client elements and the suppliers.
Re: cannot transform all suppliers in dependency [message #1065432 is a reply to message #1065422] Tue, 25 June 2013 16:35 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Well, thus it depends of the type of elements "client" and "supplier".
You should double-check the rules that are creating them and ensure that they are correct.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: cannot transform all suppliers in dependency [message #1065434 is a reply to message #1065432] Tue, 25 June 2013 16:43 Go to previous messageGo to next message
Mahin Abbasipour is currently offline Mahin AbbasipourFriend
Messages: 24
Registered: June 2013
Junior Member
Thank you very much for your reply.
How should be the general form for transforming a dependency? I behaved clients and suppliers as the properties in the class when I want to transform them.

Thanks again
Re: cannot transform all suppliers in dependency [message #1065508 is a reply to message #1065434] Wed, 26 June 2013 08:45 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
There is no "general" way of developing a transformation, this depends on the source and target metamodels you are using as well as on the actual mapping you want to implement between them.

--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: cannot transform all suppliers in dependency [message #1067472 is a reply to message #1065508] Mon, 08 July 2013 20:53 Go to previous messageGo to next message
Jeni Martin is currently offline Jeni MartinFriend
Messages: 42
Registered: November 2012
Member
Hi,

I have the same problem with dependency and associations. In my transformation, I want to copy the dependency with its supplier/clients. I used the same rule for dependency and I have separate rules for transforming client and suppliers. With "supplier <- source.supplier", in the output model, the supplier in the transformed dependency is empty. what is the reason for that? any suggestion?
Re: cannot transform all suppliers in dependency [message #1075575 is a reply to message #1067472] Mon, 29 July 2013 17:05 Go to previous message
Jeni Martin is currently offline Jeni MartinFriend
Messages: 42
Registered: November 2012
Member
If you check the console, it says the inter reference model is forbidden. to resolve this problem, you can use resolveTemp. Although in some cases ATL can resolve this problem.
Previous Topic:problem in helper
Next Topic:inject a meta model using eNS_URI()
Goto Forum:
  


Current Time: Thu Mar 28 11:31:11 GMT 2024

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

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

Back to the top