On this page
An instance specification specifies the existence of an entity in a modeled system and completely or partially describes the entity.
The description may include:
- The classification of an entity by one or more classifiers of which the entity is an instance. If the only classifier specified is abstract, then the instance specification only partially describes the entity.
- A kind of instance based on its classifier or classifiers. For example, an instance specification whose classifier is a class describes an object of that class, while an instance specification whose classifier is an association describes a link of that association.
- A specification of structural features values of the entity. Not all structural features of all classifiers of the instance specification need to be represented by slots, in which case the instance specification is a partial description.
- A specification of how to compute, derive, or construct the instance (optional).
In the Component (or Deployment) diagram Node Instance, Component Instance, Artifact Instance elements are the same Instance Specification elements with an assigned component, node or artifact.
The instances are shown using a rectangle by underlining the name string of an instance element. The instance of an actor is shown as an actor “stick man” figure with the actor’s name below the symbol.
You can specify instance properties in the instance Specification window. In the same window, you can find a description of each property. Descriptions are presented in the description area of the Specification window. If you need to handle a huge amount of instance specifications, use the instance table.
To assign a classifier to an instance, do one of the following
- On the diagram, click an instance shape, and then on the smart manipulator toolbar, click the open list, select the classifier.. In
- On the diagram, click an instance shape, and then press Ctrl+T. In the open list, select the classifier.
On the diagram, click an instance shape, then click the name area. Type the “:” and then type the classifier name. Press Enter or click anywhere on the diagram. The classifier is created and assigned.
Type the “:” colon, then press Ctrl+Space or Ctrl+Backspace and then in the open list, select the classifier.
- In the Containment tree, select a classifier and drag it to the instance shape.
Use the Node Instance button to create the Instance Specification with assigned Node and the Node Instance will have a Node shape.
To assign Instance Specification as Default Value
- Drag Instance Specification element on Classifier property on a diagram.
Drag-and-drop feature is available only if Instance Specification classifiers are compatible with the Property type and if Property is editable.
To set the initial value to an attribute of the assigned classifier
- Open instance Specification window.
- In the Slots property group, select a property and click the Create Value button.
- Type the needed value in the field on the right.
To show slots of the assigned classifier
- Select an instance shape and click the Compartments button .
- In the menu, select Slots.
By default slots of the classifier are suppressed.
To display slot type on the instance symbol
- Open instance Symbol Properties dialog.
- Set the Show Slot Type property to one of the following:
- Qualified name
To display specification value on the Instance Specification symbol
- Open instance Symbol Properties dialog.
- Select the Show Specification Value check box.
Saving Instance values to the default property values of the Block
When you have a Block and an Instance of that Block which contains some particular values, you can save those values as default to the Values property of the Block.
To save the Instance values as default
- Do one of the following:
- On the diagram pane, select an Instance.
- In the Containment tree, select an Instance.
- In the Instance table, select an Instance.
- Right-click an Instance and from the shortcut menu, select Tools > Save to Default Value(s).
- In the open dialog, select the needed options:
Save to composite parts recursively.
Redefine inherited properties.
- Save derived property values.
- Click OK.