
Chapter 4 Extending your Models with Profiles
Calculated Collections (Profile)
You define a calculated collection on a metaclass, stereotype, or criterion, when you need to display a list of associated objects with a user-defined semantic. Calculated collections (unlike extended collections) cannot be modified by the user (see Extended Collections and Compositions (Profile)).
You create calculated collections to:
- Display user-defined dependencies for a selected object, the calculated collection is displayed in the Dependencies tab of the object property sheet. You can double-click items and navigate among user-defined dependencies.
- Fine-tune impact analysis by creating your own calculated collections in order to be able to better evaluate the impact of a change. For example, in a model where columns and domains can diverge, you can create a calculated collection on the domain metaclass that lists all the columns that use the domain and have identical data type.
- Improve your reports. You can drag and drop any book or list item under any other report book and modify its default collection in order to document a specific aspect of the model (see "Modifying the collection of a report item" in the Reports chapter of the Core Features Guide).
- Improve GTL generation since you can loop on user-defined calculated collections.
For example, in an OOM, you may need to create a list of sequence diagrams using an operation, and can create a calculated collection on the operation metaclass that retrieves this information.
In a BPM, you could create a calculated collection on the process metaclass that lists the CDM entities created from data associated with the process.
To create a calculated collection:
- Right-click a metaclass, stereotype, or criterion and select New→Calculated Collection.
- Enter a name in the Name box. This name will be used as the name of the related tab in the object property sheet.
- [optional] Enter a comment to describe the collection.
- Select a metaclass in the Target Type list to form the basis of the collection.
- [optional] Select or enter a stereotype to further refine the instances of the target metaclass that may appear in the collection.
- Click the Calculated Collection Script tab and enter a script that will calculate which objects will form the collection. If appropriate, you can reuse functions on the Global Script tab.
- Click Apply to save your changes.
Copyright (C) 2008. Sybase Inc. All rights reserved.
|
|