Requirement.derived generation into document [message #1775026] |
Mon, 23 October 2017 16:57 |
Ferenc Magnucz Messages: 6 Registered: October 2017 |
Junior Member |
|
|
Hello,
I would like to ask, how can I list into a document the derived requirements of a requirement?
I try this, but it doesn't work. :-(
[for (
d : Class |
r.ownedElement
->filter(Class)
->select(not getAppliedStereotype('SysML::Requirements::Requirement').oclIsUndefined())
->sortedBy(
c1 : Class |
c1.getValue(
getAppliedStereotype('SysML::Requirements::Requirement'),
'id'
).toString()
)
)]
Derived:
[if (d.getValue(getAppliedStereotype('SysML::Requirements::Requirement'),'derived')->flatten()->notEmpty())]<drop/>
[for (
derived : Class |
d.getValue(
getAppliedStereotype('SysML::Requirements::Requirement'),
'derived'
)->flatten()
)]<drop/>
[derived.getValue(getAppliedStereotype('SysML::Requirements::Requirement'),'id')/]
[/for]<drop/>
[else]<drop/>
There isn't derived requirements.
[/if]<drop/>
[/for]
The question is same the similar attributes (derivedFrom, refinedBy, etc.) of Requirement.
And somebody explain to me why I have to use 'flatten()' function?
Thank You in advance for your help.
Regards,
Feri
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03391 seconds