Feature does not exist [message #1752361] |
Mon, 23 January 2017 03:44 |
Ruchika Kumar Messages: 50 Registered: January 2017 |
Member |
|
|
Is there any way we can write a check if a feature exists or not?
For e.g. for below input model
<elems name="MakeVoiceOvrWireless" type="Task" longName="Make Voice Connection Over Wireless">
<linksSrc xsi:type="turn:Contribution" name="contWirelessVoiceConnToHighRel" dest="//@grlspec/@actors.0/@elems.2"/>
<linksSrc xsi:type="turn:Decomposition" name="xor" decompositionType="Xor" dest="//@grlspec/@actors.0/@elems.0"/>
</elems>
I want to extract the linksSrc element which has a feature called "decompositionType". While trying to iterate over linksSrc of elems, i get the exception:
org.eclipse.m2m.atl.engine.emfvm.VMException: Feature decompositionType does not exist on Contribution
at __applyIntElements2IntElements#62(Turn2Urn.atl[133:50-133:69])
local variables: self=Turn2Urn : ASMModule, link=TransientLink {rule = IntElements2IntElements, sourceElements = {s = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@408b2b (eClass: org.eclipse.emf.ecore.impl.EClassImpl@8e631a (name: IntentionalElement) (instanceClassName: null) (abstract: false, interface: false))}, targetElements = {tIntElemRef = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@132fb47 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@6a8b48 (name: IntentionalElementRef) (instanceClassName: null) (abstract: false, interface: false)), tIntElem = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@1789cbd (eClass: org.eclipse.emf.ecore.impl.EClassImpl@48dae7 (name: IntentionalElement) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}, s=IN!WirelessVoiceConn, tIntElem=OUT!Make Voice Connection Over Wireless, tIntElemRef=OUT!<unnamed>, l=IN!contWirelessVoiceConnToVoiceConn
at __exec__#48(Turn2Urn.atl)
local variables: self=Turn2Urn : ASMModule, e=TransientLink {rule = IntElements2IntElements, sourceElements = {s = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@408b2b (eClass: org.eclipse.emf.ecore.impl.EClassImpl@8e631a (name: IntentionalElement) (instanceClassName: null) (abstract: false, interface: false))}, targetElements = {tIntElemRef = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@132fb47 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@6a8b48 (name: IntentionalElementRef) (instanceClassName: null) (abstract: false, interface: false)), tIntElem = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@1789cbd (eClass: org.eclipse.emf.ecore.impl.EClassImpl@48dae7 (name: IntentionalElement) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}
at main#27(Turn2Urn.atl)
local variables: self=Turn2Urn : ASMModule
Note: I tried with OclUndefined but it doesn't seem to work.
|
|
|
Powered by
FUDForum. Page generated in 0.03905 seconds