To collect all Leaf Requirements Owned Recursively
- Create an Opaque Behavior named 'All Leaf Requirements Owned Recursively'.
- Right-click the Opaque Behavior element/symbol and open its Specification window. Do one of the following:
Click the plus sign next to the Owned Parameter property to edit it.
If you cannot see the Owned Parameter property, make sure the Expert mode is enabled.
- On the left side menu, select Parameters > Create.
- In the Specification of Parameter window, set Name to input, Type to Class, and Direction to in. Click Back.
- In the Opaque Behavior Specification window, click three dots next to the Body and Language property to edit it.
- In the Body and Language dialog, select Language > StructuredExpression.
Click Create Operation > Filter.
- Select Input > Implied Relation.
- Select Element and set the Value to input.
- Select Criteria > Body > Reset.
- Select Criteria > Body > Contextual Variable.
- Select Source > Body > Simple Navigation > Clear All.
- Select Source > Body > Simple Navigation. Select Owned Element and set Is Applied to true, Direction to Source To Target, and Result Type to Requirement (select Include Subtypes check box).
- Select Target > Reset.
- Select Predicate > Nested Operation.
Select Body > Operation from Model > isEmpty.
If you cannot see the isEmpty operation, make sure the Apply Filter box is not checked.
- Select Input > Simple Navigation. Select Owned Element and set Is Applied to true, Direction to Source To Target, and Result Type to Requirement.
- Click OK.
The model used in these examples is the Case Studies for Querying the Model sample model. To open this model, you need to download case studies for querying the model.mdzip.