HETEROGENEOUS enables a single property to refer to definitions of more than one type. (A normal list references definitions of a single type.) The HETEROGENEOUS keyword is used to modify either the ONEOF or the LISTOF keyword.
When you click the Choices button of a class list, only class definitions are provided to choose from.
When you click the Choices button of a heterogeneous list, you are provided with various types of definitions that are specified in the heterogeneous list clause, such as class, process, entity, and so on.
The reset clause clears any existing list of specified types for the property.
Restrictions
There are certain restrictions for a heterogeneous list property. You cannot use any of the following keywords with the HETEROGENEOUSLISTOF or HETEROGENEOUSONEOF keyword in the same property:
Most of the time, you are expected or are being restricted to dragging values into a heterogeneous property from the Select and Drag browser provided by clicking Choices. There are two other methods of entering new values into the property.
Adding the values manually
You can add the values manually. To add new values you must enter the new values with their fully-qualified name, in the following format:
ClassName:TypeName:FullyQualifiedName
where:
•ClassName is the System Architect encyclopedia class type: Diagram or Definition.
•TypeName is the specific name of the Diagram or Definition type, such as Class (definition) or Use Case Step (definition).
•Each part of the FullyQualifiedName is separated by periods.
For example, a Use Case Step, which is keyed by its Use Case, which is keyed by its Package, would be entered as follows:
Definition:"Use Case Step":"package-name"."use-case-name"."use-case-step-name"
Adding values by using the + button
You can add new values is by clicking the + button.
1 Select a definition type; for example, Class.
2 Enter the new Class definition’s required properties, and then click OK. An edit session for the new Class definition opens.
3 Modify other properties of the new definition, and then click OK. A reference to the new definition is added to the heterogeneous property.
Example
In following example, the “Underlying Procedure” property of the “Procedure” definition can be populated with definitions of the type Use Case, Class, Method, and Use Case Step.
The user interface provided by the HETEROGENEOUSONEOF or HETEROGENEOUSLISTOF keyword displays a column that contains the name of each definition type, and the fully qualified name of the particular definition dragged into the list.
The key properties that qualify the name of a definition are provided in the user interface, separated from each other by . (periods). For example a Use Case Step is keyed to its containing Use Case, which is keyed by its containing Package. In the HETEROGENEOUSONEOF or HETEROGENEOSLISTOF field, a Use Case Step is represented by "package-name"."use-case-name"."use-case-step-name".
If there are embedded spaces in the name of any item, that item is enclosed in quotation marks. For example, in the picture above, the Use Case Step named "Approve Credit" is in the Use Case named Reservation_System, which belongs to the Package named "Reserve Room".
When you click Choices for a heterogeneous list, all called for types of Diagram, Symbol, or Definition are presented, with their type listed in brackets after their name.
The Properties window also presents values of a heterogeneous list. You can drag the borders of the Properties rows or columns to see the values. Each value is preceded by its class type (Diagram, Symbol, or Definition), type name (that is, Use Case Step definition).