[M2Doc] target requirement relation

hello everyone,
I try to excerpt the requirements (From the Requirements VP) associated to a Physical Component in M2Doc.
How can I find the way to catch the good M2Doc Query for, from a requirement relation, find the target/source of this relation ? I can’t find it in the Sirius interpreter as well…
Regards ,

Hello Julien,
It all depends if you have used incoming links or outgoing links from the Component.
If you have used outgoing links:
The links are stored under the component.
There are several ways to retrieve the requirements:
component.ownedExtensions->filter(CapellaRequirements::CapellaOutgoingRelation).target
component.eContents(CapellaRequirements::CapellaOutgoingRela tion).target
If you have used incoming links:
The links are stored under the requirement.
You can retrieve it using this kind of query:
component.eInverse(‘target’)->filter(CapellaRequirements::CapellaIncomingRelation).source

Hello Aurelien :
The first method worked perfectly.
The second one (with the eContents() ) raised an error ( attached in the Methode2 file )
Concerning the Incoming links :
Even if it worked on the Sirius Interpreter, the utilisation with M2Doc raised an error attached in the ‘filter error’ file.
The error said that a service is missing : I attached the list of the services that my template have. Isn’t the ‘aql.queries’ service the one that is missing ?
thank you very much for your answer in any case.
regards,
Julien

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.