To filter Properties Redefined by a Specific Property


  1. Create an Opaque Behavior named 'Filter Properties Redefined by Specific Property'.
  2. Right-click the Opaque Behavior element/symbol and open its Specification window. Do one of the following:
    1. 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.

    2. On the left side menu, select Parameters > Create.
  3. In the Specification of Parameter window, set Name to inputType to Element, Direction to in, and Multiplicity to [1..*]. Click Back.
  4. Create a second parameter.
  5. Set Name to redefinesType to PropertyDirection to in, and Multiplicity to [1]. Click Close.
  6. In the Opaque Behavior Specification window, click three dots  next to the Body and Language property to edit it.
  7. In the Body and Language dialog, select Language > StructuredExpression.
  8. Click Create Operation > Filter

  9. Select Input > Contextual Variable and set the Value to input.
  10. Select Predicate > Operation from Model > Contains.
  11. Select Body > Input > Metachain Navigation.

  12. Click Insert.

  13. Under Metaclass or Stereotype, select Property, and under Property, select Redefined Property.

  14. Select Obj > Contextual Value > redefines.

  15. Click OK.

Sample model

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