This service is archived, please use www.eclipse.org/forums


Home » Capella » M2Doc » M2Doc and capella requirments VP
M2Doc and capella requirments VP [message #3747] Wed, 04 December 2019 11:14 Go to next message
jmorane is currently offline  jmorane
Messages: 63
Registered: May 2019
Member
Hello,

Does anyone knows how to display the requirements linked to a Physical component with M2Doc ?



I tried the following demarch. pc is my Physical component :

First :for req | pc.eAllContents() ->filter(Requirements::Requirement) ( and then req.toString() ). Nothing is displayed

Then -> for req | pc.eAllContents() ->filter(Requirements::AbstractRelation) ( and then toString() ), which display only outgoing relations when pc is the Physical system !

I then made a short experiement : I bound an component with a REQ, both with incoming and outgoing relation (picture attached). I then tried m:for req | pc.eAllContents() ( and then toString() ), but no element related to requirements relation where displayed !



Any help will be helpfull Smile

regards,
Re: M2Doc and capella requirments VP [message #3755 is a reply to message #3747] Fri, 06 December 2019 05:09 Go to previous messageGo to next message
jmorane is currently offline  jmorane
Messages: 63
Registered: May 2019
Member
Back to precise my question :

I further investigate in the forum, and found that topic : https://polarsys.org/forums/index.php/t/485/
I did not undestood why the 'owned extensions' attribute displayed outgoinf Req relations for functions and not for PC.

I then realized that the outgoing Req relations was affected not to the Physical component but to the element of class 'Part' related to it (picture attached).
So, in my M2DOc template, from the Physical component I invocate the Part element with pc.abstractTypedElements, and then I could easily display the associated requirements.


To get the incoming Req relations, my first guess was to iterate on all the Requirements and filter the ones having an outcoming relation with my PC. It worked.



If anyone as an other solution for solving that topic, I will be very interessed to read it !
Finnaly, if someone can quickly explain the differences between Physical Components / Part physical Components, it can also be quite usefull !


regards,

Re: M2Doc and capella requirments VP [message #3757 is a reply to message #3755] Fri, 06 December 2019 06:09 Go to previous message
Aurélien Pinsonneau is currently offline  Aurélien Pinsonneau
Messages: 169
Registered: November 2016
Senior Member
Hello Julien,

The difference between Component and Part comes from SysML.
In SysML, you must first define type and then instances of elements.

In Capella, Component is the type and the part is the instance.
Even if Capella metamodel implement those 2 notions (component and part), everything is done in order to hide this distinction to the user.
Previous Topic: recusrsivity in M2Doc
Goto Forum:
  


Current Time: Sat Apr 04 01:04:31 EST 2020

Total time taken to generate the page: 0.01607 seconds