one element to multiple transformation [message #1723964] |
Fri, 19 February 2016 09:57 |
Lujain AlDakheel Messages: 7 Registered: December 2015 |
Junior Member |
|
|
Hello,
i have a simple transformation rules where the first class in Source has a Name and transformed to a name too in the target class. its work very well.
the thing is, i have another class which has 3 attributes + 2 associations to another classes in the source model and each association should take an attribute from another class which already been transformed.
the simple rule i wrote:
rule ResCons2Token {
from
D: UML!ResConsumption
to
Token: CPN!ResConsToken (
ResCons <- D.CompName+','+D.Compunit+','+D.CPUCons+','+D.MemoryCons+','+D.PowerCons)
}
CompName + Compunit are the association names, the Ekeys for them are the attributes i need them to get from Class Components, Compunits where they already transformed for a target elements.
how can i do that? how can i use the source element to multiple transformation?
the error i got while running this transformation is:
org.eclipse.m2m.atl.engine.emfvm.VMException: Trying to register several rules as default for element org.eclipse.emf.ecore.impl.DynamicEObjectImpl@3832ea3f (eClass: org.eclipse.emf.ecore.impl.EClassImpl@3acb97b7 (name: AllocateProblem) (instanceClassName: null) (abstract: false, interface: true)) : Component2Token and CompUnit2Token
Component2Token, CompUnit2Token are the 2 rules i create before and need to get their source element in my other rule.
Thanks in Advance
|
|
|
|
Powered by
FUDForum. Page generated in 0.03047 seconds