Creating a Class Instance

Tigerstripe Workbench provides a drag-and-drop development environment for creating a class instance. Complete the following procedure, to create a class instance.

Note: Before you can create a class instance using the Instance Diagram Editor, you will first need to create a Class Diagram. For more information about creating a Class Diagram using the Class Diagram Editor, refer to The Class Diagram Editor.

To create a class instance:

  1. Create a instance diagram as outlined The Instance Diagram Editor section.
  2. Expand the Tigerstripe Explorer, navigate to the Artifacts Package (by default, Tigerstripe names this com.mycompany).
  3. Click the artifact and drag it into the Instance Diagram Editor. The Class Instance Editor dialog box opens.

  4. Enter an instance name in the Instance name text box. All instance names must be unique. If you enter a name that is not unique, an error displays and you will not be able to complete the creation of your instance.
  5. Select the fields from the Instance Fields list. Note: You must enter a value in the Value text box in addition to selecting the check-box. If you only select the check-box and do not enter a value, that field will not be populated in the diagram.
  6. Click OK. The class displays in the Instance Diagram.

When selecting instance fields in the Class Instance Editor, you can directly enter values in the Value text box without selecting the associated check-box and the value will be populated. However, if you do not enter a value in the Value text box and do not select the check-box, the instance field will not populate in the diagram.

Creating a Class Instance Association

The Instance Diagram Editor only displays the associations that can be created for the given source and the selected target. The editor limits the type of association links that you can create to only those links possible for the endpoints being created.

The editor also enforces constraints on endpoint multiplicity defined for the selected instance type and prevents the creation of abstract associations. If the creation of a new association violates the underlying constraints, the Instance Diagram Editor provides you with the option of replacing the current instance with the new instance being constructed.

Note: The creation of an association class instance results in the creation of two association instances and a class instance that link the endpoint for which the association class instance is being created.

To create a class instance association:

  1. Rest the mouse cursor over the class instance in the Instance Diagram Editor. The Connection Handles appear at the edge of the class instance placeholder.
  2. Select the arrow for the Connection Handle that matches the direction of the association you want to create.
  3. Click and drag the Connection Handles to create an association or an association class instance that link class instances.

Note: To delete and association link, select the association and press DELETE.

Related Topics

The Instance Diagram Editor
Using the Instance Diagram Editor
Setting Class Instance Attributes
Editing a Class Instance Diagram
Deleting a Class Instance Diagram
Additional Instance Diagram Editor Tools

 Setting Class Instance Attributes

© copyright 2005, 2006, 2007 Cisco Systems, Inc. - All rights reserved