[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] ATL:Multiple assignments in an iterator

Hi,

 I have a rule in which


matichingRules :PdmModel!MatchingRules (
name<-'matchingrules',
ldapMatchingRules<-LdmMetaModel!LDMAttribute.allInstances()->iterate(e; res : Sequence( PdmModel!LdapMatchingRuleType) = Sequence {} |
let rs:TupleType(rulename:String,oid :String)= thisModule.getmatchingrules(e.type).get('aprxMatchingRule') in
let rs1:TupleType(rulename:String,oid :String)= thisModule.getmatchingrules(e.type).get('eqMatchingRule') in
if rs.oclIsUndefined()
if not res->collect(f | f.name)->includes(rs.rulename)then res->including(thisModule.ldapMatchigrule(rs.rulename,rs.oid))
else res
endif
else
res
endif


if rs.oclIsUndefined()
if not res->collect(f | f.name)->includes(rs1.rulename)then
res->including(thisModule.ldapMatchigrule(rs1.rulename,rs1.oid))
else res
endif
else
res
endif))


Here i wanted to add rs,rs1 for each LdmMetaModel!LDMAttribute but mutiple if loop is not working

before adding rs,rs for each LdmMetaModel!LDMAttribute i'll check if it's already exists to avoid duplicates.


can u help me

thanks
venkatesh