Create a UML collaboration diagram

Show me an example

  1. On the File menu, point to New, point to Software, and then click UML Model Diagram.

  2. In the Подання дерева, right-click the Подання дереваpackage in which you want to include the Подання дереваpackageСхема співпраці, point to New, and then click Collaboration Diagram.

    A blank page appears, and the UML Collaboration stencil becomes the top-most stencil. The workspace displays 'Collaboration' as a watermark. An icon representing the diagram is added to the tree view in the Model Explorer.

    Примітка : If the tree view is not visible, on the UML menu, point to View, and then click Model Explorer.

  3. For each object role you want to represent in the collaboration, drag a Classifier Role shape onto the drawing page.

    Classifier Role shape

    Designate an object as new, destroyed, or transient in a collaboration diagram

    1. In a Подання дереваpackageСхема співпраці, right-click the Classifier Role shape for the object you want to designate as new, destroyed, or transient, and then click Shape Display Options.

    2. Under Classifier role state, click the condition you want.

      Примітка : To apply this change only to the selected shape, in the Shape Display Options dialog box, clear the option Apply to the same selected UML shapes in the current drawing window page. If you want all subsequent classifier role shapes you drop on the diagram to have the same condition, select the Apply to subsequently dropped UML shapes of the same type in the current drawing window page check box.

      The condition appears in brackets after the object name (for example, Object1{transient}).

    Designate an object as active in a collaboration diagram

    In a Подання дереваpackageСхема співпраці, a Classifier Role shape designated as active will include {active} after the object name. A classifier role is active when the class it is based on is active.

    To indicate that a class is active, double-click the shape or tree view icon that represents the class. In its UML Class Properties dialog box, click Class, check IsActive, and then click OK. The classifier role becomes active as a result of the class being active.

  4. For each set of objects you want to represent, drag a Multi-Object shape onto the drawing page. Multi-Object shape

  5. Double-click each Classifier Role or Multi-Object shape to open the UML Classifier Role Properties dialog box where you can add a name and other property values.

  6. Indicate links between the objects by connecting them using Association Role shapes. Work with Association Role shapes

    Create an association role path in a collaboration diagram

    1. In a Подання дереваpackageСхема співпраці, drag an Association Role shape near the two Classifier Role or Multi-Object shapes you want to create a path between.

    2. Glue the endpoints of the Association Role shape to connection points Точка з’єднання – блакитний хрестик on the two shapes you want to connect with a path.

      Порада : To indicate an association role path from a classifier role to itself, glue the two endpoints of a U-shaped Association Role shape to two connection points on the same classifier role.

  7. Double-click each Association Role shape to open the UML Association Role Properties dialog box, where you can add a name, a message flow, a message label, multiplicity, and other property values.

    Add a message to an association role in a collaboration diagram

    1. In a Подання дереваpackageСхема співпраці, double-click the Association Role shape to which you want to add a message.

    2. Type a name for the association role, and then click Messages.

    3. Click New. Type a name and sequence expression. Choose the stereotype, direction, and flow kind you want.

    4. For a flat message or procedure call, click Properties. Select the operation you want the message to generate. If the operation doesn't exist, click New to create it.

      For an asynchronous message, choose the signal you want the message to generate. If no reception for the signal exists on the classifier that the object lifeline receiving the message is based on, click New to create the reception.

  8. Save the diagram.

Отримуйте нові функції раніше за інших
Приєднайтеся до оцінювачів Office

Ця інформація корисна?

Дякуємо за ваш відгук!

Дякуємо за відгук! Схоже, вам може стати в нагоді допомога одного з наших спеціалістів служби підтримки Office, з яким ми вас можемо з’єднати.