On this page

In a template, a Viewpoint Method Diagram is used to define how model information is collected from the model and displayed on the web. For example, in the Entire Model template, this diagram (Requirements ViewPoint) starts to collect information from the root element of the scope of elements selected in the Cameo Collaborator Publisher dialog. It exposes the content of model elements according to the rules defined in this diagram. As a result, the Requirements ViewPoint diagram exposes model information on the web.

Note that 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.


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.

 

The Requirements ViewPoint diagram of the Entire Model template exposing model information on the web.

In a custom project template, you can create your own activities that describe how to publish model elements. These activities can be reused in different places in the template by dragging them to the Requirements ViewPoint diagram or another Viewpoint Method Diagram. This allows a modeling tool to automatically create call behavior actions for the activities. But in this case, it is very important to set the «StructuredQuery» stereotype for newly created call behavior actions.

Displaying elements in a navigation tree

In the Requirements ViewPoint diagram, the Structured Activity Node with the «StructuredQuery» stereotype creates the visual representation of the elements in a navigation tree. The properties of this Structured Activity Node can be defined in its Specification window.


Specification window of the Structured Activity Node with the «StructuredQuery» stereotype.

Useful property information

If you want an element to be represented in the navigation tree, the values of Create Sections and Loop properties of that element must be true


Displaying owned elements

In the Requirements ViewPoint diagram, the ElementSpecification Call Behavior Action is used to collect and display the elements owned by the root element of a model. The actions owned by this Call Behavior Action are displayed in the ElementSpecification diagram as shown in the figure below.


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.


ElementSpecification diagram displaying the Call Behavior Action used to collect owned elements.

In the ElementSpecification diagram, the Call Behavior Action with the «CollectOwnedElements» stereotype is used to collect owned elements. The value of the Depth property, which is highlighted in the figure above, defines which level elements are collected. In this case, the collected elements are of the first level.
 

Displaying deep-nested model elements

In the ElementSpecification diagram, the ElementSpecificationLooper Call Behavior Action is used to collect and display all the deep-nested elements of a model. For this, the action uses recursion by calling itself. The actions owned by this Call Behavior Action are displayed in the ElementSpecificationLooper diagram.


To open the ElementSpecificationLooper 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.

  3. In the ElementSpecification diagram, double-click the ElementSpecificationLooper Call Behavior Action.

The ElementSpecificationLooper diagram opens.


ElementSpecificationLooper diagram of the Entire Model template.

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: