On this page

Elements displayed in a published project can be filtered and sorted using specific Call Behavior Actions. This allows you to define what content is to be published on the web. This page explains how to access and modify the actions of the predefined Entire Model template, but you can work with the copies of other predefined templates a similar way.

Important

DO NOT change predefined templates. If you want to customize a predefined template, first create the copy of this template with a different name, and then modify the newly created template file.


Filtering model elements

In the Requirements ViewPoint diagram of the Entire Model template, the Call Behavior Action with the «FilterByStereotypes» stereotype is used to filter model elements. In the figure below, the elements are filtered by stereotypes, but you can use other filtering methods by creating actions with different stereotypes.


The Requirements ViewPoint diagram of the Entre Model template with the Call Behavior Action that filters model elements by stereotypes. 

Using Call Behavior Actions with the following stereotypes allows you to choose what filtering method is used when filtering model elements:

  • «FilterByContainment» - click  in the model browser and select Filter to choose element types that should be displayed.


The Select Element Type dialog where you can choose what types of model elements are displayed.
  • «FilterByDiagramTipe» - choose what diagram types should be used as filter criteria by specifying the value of the Diagram Types property.
  • «FilterByNames» - define regular expression strings that should be used as filter criteria by specifying the value of the Names property.
  • «FilterByMetaclasses» - select the metaclasses that should be used as filter criteria. They are stored in the UML Standard Profile.
  • «FilterByExpression» - define the OCL expression that should be used as filter criterion.
  • «FilterByStructuredExpression» - select a structured expression that should be used as a filter criterion.

To open the Requirements ViewPoint diagram of the Entire Model template


  1. Click the Diagrams tab in the model browser of an open template.
  2. Expand the Collaborator View Diagrams package and double-click the Entire_model_template diagram.
  3. In the open diagram, double-click the element with the «Viewpoint» stereotype.

The Requirements ViewPoint diagram opens.

Important

Specify the value of the Include property to choose whether the indicated filter criteria are used for inclusion or exclusion.


Sorting model elements

The Call Behavior Action with the «SortByContainment» stereotype displayed in the ElementSpecification diagram doesn't have any properties, and is used to sort the selected set of elements in the same manner they are sorted in the Containment tree of a modeling tool.


The ElementSpecification diagram of the Entire Model template with the Call Behavior Action that is used to sort model elements by containment.

To open the ElementSpecification diagram of the Entire Model template


  1. Open the Requirements ViewPoint diagram.

    1. Click the Diagrams tab in the model browser of an open template.
    2. Expand the Collaborator View Diagrams package, and double-click the Entire_model_template diagram.
    3. In the open diagram, double-click the element with the «Viewpoint» stereotype.
  2. Double-click the ElementSpecification Call Behavior Action.

The ElementSpecification diagram opens.

Sample project template

The template file used as an example on this page is the copy of the predefined Entire Model template that comes with Cameo Collaborator Publisher plugin. To access the template file do one of the following: