Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » ATL(problem while running the transformation in ATL 3.0 )
ATL [message #508250] Mon, 18 January 2010 06:01 Go to next message
venkatesh  is currently offline venkatesh Friend
Messages: 41
Registered: July 2009
Member
Hi

I have created ldm2pdm.atl file using ATL 2.0 & it's working fine but when i try to execute the same file in ATL 3.0 it's not showing any error but in the endrule the reference is not assigned .


(I have 2 source model & one output Model).


Source Model:My.ldmModel, My.pdmModel
Output Model: My.pdmModel

This is my code

create PdmModelModel : PdmModel from LdmMetaModelModel : LdmMetaModel, bIn : PdmModel;

helper def: nameToAssignHistory : Sequence(TupleType(e :PdmModel!PDMAttribute, s : String,type:LdmMetaModel!AttributeType)) =
Sequence {};

endpoint rule EndRule() {
do {
for(dta in thisModule.nameToAssignHistory) {
dta.e.type <- pdmModel!LdapAttributeType.allInstancesFrom('bIn')->any(e |e.name= dta.s);
dta.e.documentation<- pdmModel!LdapAttributeType.allInstancesFrom('bIn')->any(e |e.name= dta.s).toString();
}
}

In this endrule the reference for the dta.e.type(LdapAttributeType) is not assigned

but when i try to assign the string value of the LdapAttributeType reference in dta.e.documentation it's assigning properly.

if it shows some error then i can find out but it's not showing any error.

Please help me.

Thanks,
Venky

Re: ATL Problem in ATL 3.0 [message #508481 is a reply to message #508250] Tue, 19 January 2010 07:06 Go to previous message
venkatesh  is currently offline venkatesh Friend
Messages: 41
Registered: July 2009
Member
Hi,

Here i tried in another way but still it's not working.

PdmModelModel : PdmModel is the output model

LdmMetaModelModel : LdmMetaModel is the sourcemodel

bIn : PdmModel is the source model.


create PdmModelModel : PdmModel from LdmMetaModelModel : LdmMetaModel, bIn : PdmModel;




This is the rule



rule LDMNamingAttribute_2_PDMNamingAttribute6 {
from
v_left : LdmMetaModel!LDMNamingAttribute
using{
Objecttype :PdmModel!LdapAttributetype=PdmModel!LdapAttributetype.allIn stancesFrom('bIn')- >any(e |e.name='t_dc' );
testname :String = if not Objecttype.oclIsUndefined() then
Objectclass.name
else
'null'
endif ;
}

to
v_right : PdmModel!PDMNamingAttribute (
name<-v_left.name
documentation<-testname,
type<-Objecttype

}

here i have multiple source model so from ''bIn'' model i'm trying to access the PdmModel!LdapAttributetype and assign to the
'type' in v_right : PdmModel!PDMNamingAttribute it's not assigning

but when i try to assign the name of the PdmModel!LdapAttributetype to the ' documentation'
it's working

the following code is not working

type<-Objecttype but the Objecttype is existing.


please help me.

thanks
venky


Previous Topic:[QVTO] Questions about specialisation (inheritance)
Next Topic:"Unable to load extractor atl" error message
Goto Forum:
  


Current Time: Mon Aug 26 07:46:09 GMT 2019

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

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

Back to the top