Just adding to this, I wanted to be able to reach the values of enumeration too but I’ve come to this point where it seems I can’t go on without getting the value from the applied properties.
You are collecting all elements at de depth of 2 and some of them don’t have a feature name (see error message for the list). You probably need to do something more specific.
You will need to select the extension of the corresponding type for PVMT:
myComEx.ownedExtensions->filter(PVMTPackage::PVMTType).description
you can use the .eClass() service in the interpreter to find the appropriate type. Select the extension and use “aql:self.eClass()”. If you want to know the list of features you can use “aql:self.eClass().eAllStructuralFeatures”.
You should also add PVMT metamodels to your template properties.
Hi Yvan,
I found a different solution (actually I believe it falls in your solution but is more specific). It was described in a topic on the old Forum (link below).
Too bad I wasn’t able to find it there before. I searched it but I only found it today by reading each post until finding the answer. I’ll leave the link so others can use this solution as well.
https://forum.mbse-capella.org/t/905/
Hi,
Since the link provided by Fabio_Guarita_old is not available anymore, I can suggest this solution.
The query
aql:self.eAllContents(fa::ComponentExchange).eContents().eContents()->select(x | x.name = ‘Description’)
return objects of type AbstractPropertyValue that doesn’t have feature named “value”.
Since “Description” feature is a StringProperty, you have to convert the result in StringPropertyValue before :
aql:self.eAllContents(fa::ComponentExchange).appliedPropertyValueGroups.eContents(capellacore::StringPropertyValue)->select(x | x.name = ‘Description’).value
Kind Regards
Valery