Modeling with Collaboration Diagram

The following elements are available in a collaboration diagram.

Object

Procedure for creating object

In order to create Object,

  1. Click [Toolbox] -> [Collaboration] -> [Object] button.
  2. And click at the position where Object will be placed in the [main window].
  3. Then quick dialog is shown. At the quick dialog, enter the object name.
  4. And press [Enter] key.

Procedure for creating outgoing from object stimulus by using shortcut creation syntax

In order to create outgoing stimulus from selected object to another object,

  1. Double-click from-object, or select from-object and press [Enter] key to pop up quick dialog.
  2. At the quick dialog, enter stimulus name after "->" string ("<-" string for incoming and "<->" for outgoing with return).
  3. Press [Enter] key and outgoing stimulus from selected object to target object is created and placed at the last order.

Procedure for setting active object

In order to set class to active object,

  1. Set assigned class's [IsActive] property to true.
  2. For MyObject, change MyClass's [IsActive] property.
  3. If class property is not assigned, you can't change object to active object.

Procedure for setting to multi object

In order to set object to multi object,

  1. Set object's IsMultiInstance property to true.
  2. Then the object is assigned as multi object.

     

Procedure for creating object from class

In order to create object from class,

  1. Select class in the [model explorer].
  2. Drag it into collaboration diagram.
  3. Then the object(instance of the class) is created.

Procedure for creating class from object

If class is not assigned to object,

  1. Double-click object to pop up quick dialog. Then quick dialog is opened.
  2. At the quick dialog, click add class button.
  3. At the [Enter element name] dialog, enter new class name.
  4. Then new class is created and assigned to object.

     

If you want existing class to be assigned to object, enter the existing class name at the [Select a model element] dialog.

Procedure for adding AttributeLink to object

There are two way to add attribute link to Object.

In the case of using object model,

  1. Select object in the [main window] or in the [model explorer].
  2. Right-click the selected object, select [Add] -> [Attribute Link] popup menu, and you can add Attribute Link.
  3. Then new attribute link is created.

In the other case,

  1. Select [Collection Editor...] popup menu of object or click button in [Slots] property on properties window.
  2. At slots tab of the [collection editor], you can add attribute link by using button.

Link

Procedure for creating link

In order to create Link,

  1. Click [Toolbox] -> [Collaboration] -> [Link] button.
  2. Drag from one Object and drop to the other Object in the [main window].
  3. Between two objects, the link is created.

SelfLink

Procedure for creating self-link

In order to create self-link,

  1. Click [Toolbox] -> [Collaboration] -> [SelfLink] button.
  2. And click the object that self-link will connect to in the [main window].

Procedure for creating self-stimulus

In order to create self-stimulus,

  1. Click [Toolbox] -> [Collaboration] -> [ForwardStimulus/ReverseStimulus] button.
  2. And click the self-link that the stimulus will be placed in the [main window].
  3. And double-click the stimulus, enter the stimulus name at the quick dialog.

Stimulus

Procedure for creating stimulus

In order to create stimulus,

  1. Click [Toolbox] -> [Collaboration] -> [ForwardStimulus/ReverseStimulus] button.
  2. Click the link that the stimulus will be placed in the [main window].
  3. And double-click the stimulus, enter the stimulus name at the quick dialog.
  4. The result is as follows.

Procedure for changing ActionKind of stimulus

The [ActionKind] property of stimulus should be assigned to one of five sort as following. To change [ActionKind] property, select stimulus and select the [ActionKind] property on the properties window.

ActionKind Shape
CALL
SEND
RETURN
CREATE
DESTROY

Frame

Procedure for creating frame

持失 号狛:

In order to create Frame,

  1. Click [Toolbox] -> [Collaboration] -> [Frame] button.
  2. And click at the position where Frame will be placed in the [main window].
  3. The result is as follows.

Diagram

Procedure for showing sequence numbers in the diagram

In order to show or hide stimulus sequence number, select the diagram in the [model explorer] or in the [main window], and configure [ShowSequence] property of diagram to true or false.

Procedure for changing signature style of message in the diagram

There are four message style. To change stimulus signature,

  1. Select the diagram in the [model explorer] or in the [main window].
  2. And configure [MessageSignature] property of diagram to one of the followings.
Style Description
NONE shows only message name
NAMEONLY shows message name and arguement name
TYPEONLY shows message name, arguement type, and return type
NAMEANDTYPE shows message name, arguement name, arguement type, and return type