Some capabilities are associated with model templates so that, when you select a particular template from which to create a model, only the corresponding tools are displayed. For example, if you use specific diagram types in your models, you might choose to enable only the corresponding UML Diagram Building Block capabilities.
The model capabilities take precedence over workbench capabilities; they are written directly to the model. Therefore, if the model is opened in a different workspace, the capabilities that are associated with that model remain in effect.
When you work with models, if you try to perform an action for which the corresponding workbench capability is disabled, you are prompted to enable the capability in the Preferences window.
Viewpoints are sets of capabilities that you can use to quickly enable or disable various components when you work with models. You can use viewpoints to limit the capabilities that are enabled in the workspace, without changing the capabilities that are associated with a model.
The default viewpoint is the Model viewpoint, which provides full UML element and UML diagram capabilities. IBM Rational modeling products include two additional predefined viewpoints: Use Case, and Analysis and Design. Each viewpoint provides the capabilities that are relevant to the user goal. For example, the Use Case viewpoint provides capabilities that support use-case modeling, such as use-case diagrams, freeform diagrams, and use-case building blocks. You can also create custom viewpoints that include only the capabilities that you require.
You should use viewpoints to control capabilities. If you enable workbench capabilities, and open a model that has specific model capabilities enabled, the resulting UI might not be limited as you expect; this occurs because model capabilities override workbench capabilities. However, if you use viewpoints, the available UI should be what you expect to see.
The final set of capabilities that is enabled for a model depends on how you define the capabilities. If you use the Model viewpoint, either the model capabilities or the workbench capabilities are applied. If you use other viewpoints, the final capabilities are calculated from the intersection of the capabilities that are associated with the selected viewpoint and the capabilities that are currently enabled in the workbench or in the model.
| Scenario | Capabilities that are applied to the model |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following example illustrates how you can use the various workbench, model, and viewpoint capabilities in a modeling project.
In this example, you work as a developer on a project where the team members share several models; however, different members focus on different parts of the model, depending on their role.
The architect determined the style of modeling to use. To simplify the development of a particular model, the architect enabled the following UML diagram building blocks: Class Diagram, Sequence Diagram, State Machine Diagram, and UseCase Diagram.
As a developer, part of your work requires you to make designs based on use cases, so you create a viewpoint that refines the UI to only reveal those elements that pertain to use-case, class, and sequence diagrams. Another part of your work focuses on creating the state models for elements, so you create another viewpoint that reveals only those elements that pertain to class and state machine diagrams. You can then switch viewpoints when you work on different tasks.
Another member of the team only performs use-case analysis. This analyst creates new models that other team members add to. Because the analyst has a very specific role, a simplified user interface can help reduce the workspace clutter for that role. The analyst sets the workbench capabilities to only reveal those elements that pertain to use-case, class, and sequence diagrams. When this analyst creates a new model, there is no need to switch to a special viewpoint because the workbench preferences limit what is displayed in the user interface. Because no specific capabilities are enabled for the model, other team members can add other UML diagrams to the same model.
In summary, if specific capabilities are enabled for a model, team members can use only those capabilities; however, each team member can further limit the user interface by selecting a viewpoint. If specific capabilities are not enabled for the model, team members can limit the user interface to elements that are appropriate to a role by creating their own viewpoint or by setting their own workbench preferences.