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:

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.

Steps To create a calculated collection:

  1. Right-click a metaclass, stereotype, or criterion and select New→Calculated Collection.
  2. Enter a name in the Name box. This name will be used as the name of the related tab in the object property sheet.
  3. [optional] Enter a comment to describe the collection.
  4. Select a metaclass in the Target Type list to form the basis of the collection.
  5. [optional] Select or enter a stereotype to further refine the instances of the target metaclass that may appear in the collection.
  6. 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.
  7. Click Apply to save your changes.

 


Copyright (C) 2008. Sybase Inc. All rights reserved.