您可以捐助,支持我们的公益事业。

1元 10元 50元





认证码:  验证码,看不清楚?请点击刷新验证码 必填



  求知 文章 文库 Lib 视频 iPerson 课程 认证 咨询 工具 讲座 模型库 Model Center   Code  
会员   
   
业务架构设计
4月18-19日 在线直播
基于UML和EA进行系统分析设计
4月25-26日 北京+在线
AI 智能化软件测试方法与实践
5月23-24日 上海+在线
     
   
 
 订阅
协作图(英文)
 
作者:ifi.uio.no
 
 
  67  次浏览      28 次
2009-02-09
 
编辑推荐:
本文主要介绍了uml 协作图角色、实例和对象,对了解UML建模有所帮助。
本文来自于博客,火龙果软件Alice编辑,推荐。

Purpose

A collaboration diagram shows the objects and relationships involved in an interaction, and the sequence of messages exchanged among the objects during the interaction.

Compared with a sequence diagram

A sequence diagram shows the objects and messages involved in an interaction. It shows the timing of the messages, but not the relationships among the objects.

As a decomposition diagram

The collaboration diagram can be a decomposition of a class, class diagram, or part of a class diagram; it can be the decomposition of a use case, use case diagram, or part of a use case diagram.

Example COD

A sample collaboration diagram.

Control panel

The control panel of the collaboration diagram.

Actors, Instances, and Objects

Actor

An actor in a collaboration diagram represents the person, software, hardware, or other agent external to the system that is interacting with the system.

Label

name

Instance

An instance in a collaboration diagram represents an instantiation of a class in a class diagram or a use case in a use case diagram

Label

[instance-name][:instance-type]

  • instance-name is the name of the instance
  • instance-type is a class or a use case
  • Note: While both elements of the label are optional, you must provide one of them to avoid check errors.

    Multi object

    A multi object represents a set of instances at the many end of an association. If necessary, you can use the instance symbol to show one instance of the set and a composite link symbol to show that the instance is part of the multi object.

    Label

    [name][:type]

  • name is the name of the multi object
  • type is a class or a use case
  • Note: While both elements of the label are optional, you must provide one of them to avoid check errors.

    Active object

    An active object is an instance that owns a thread of control and can initiate control activity. For example, processes and tasks are active objects. Active objects can contain other symbols and links among them.

    Label

    [name][:type]

  • name is the name of the active object
  • type is a class or a use case
  • Note: While both elements of the label are optional, you must provide one of them to avoid check errors.

    Links

    Links in collaboration and class diagrams

    The links (associations, aggregations, and so on) in a collaboration diagram show the paths available for messages; they do not provide detailed information about the links. For example, the links in a collaboration diagram do not show the multiplicity of the links. The class diagram defines the links, providing detailed information about them.

    Descriptions of the links

    For more information about each type of link provided in the collaboration diagram, see the class diagram description.

     
    Link Type Description
    Aggregation link Aggregation
    Link Association
    Composition link Composition
    N-ary Link N-ary associations
    Qualified link Qualified association
    Qualified aggregation link Qualified aggregation
    Qualified composition link Qualified composition

    Labels for links

    Each link in a collaboration diagram has two role labels and a name label:

    The role names in a collaboration diagram should be the same as the role names in a class diagram. Use the stereotype property of the role names to specify the link start and link end stereotypes.

    Messages

    Messages

    A message flow carries a message from one object to another along any type of connector (link, aggregation link, and so on). Each message flow in a collaboration diagram is characterized by direction and type.

    Creating and moving messages

    You must create a connector before you can create a message. You can place message symbols on or near a connector, moving them if necessary to prevent them from overlapping the connector. When you move a connector, its message symbols move with it.

    Message direction

    There are two message directions:

  • Backward Messages
  • Forward Messages
  • The direction in which the link was drawn determines the direction of the message.

    Message type

    You can create these types of messages:

  • Nested message
  • Flat message
  • Asynchronous message
  • Message syntax

    The default syntax for a message name is:

    <predecessor> <guard-condition>

    A comma-separated list of sequence numbers followed by a slash. The clause is omitted when the list is empty.

    <sequence-expression>

    A dot-separated list of numbers or names, optionally followed by a condition or an iteration (both enclosed in square brackets, the iteration preceded by an asterisk) and separated from the rest of the label by a colon.

    <return-value> [ = | := ]

    A data element with scope file. If the message does not return a value, the return value and the assignment operator are omitted.

    <message-name>

    A process element with scope system.

    <argument-list>

    A comma-separated list of data elements with scope file. This list is enclosed in brackets and can be empty.

    Nested message

    The nested message represents a procedure call or other nested flow of control. The nested sequence is completed before the outer level sequence resumes. The nested message symbol is represented by a filled solid arrowhead.

    Flat message

    The flat message shows the progression to the next step in a sequence. The flat message symbol is represented by a stick arrowhead.

    Asynchronous message

    The asynchronous message symbol shows an asynchronous message between two objects. The asynchronous message symbol is represented by a half stick arrowhead.

    Patterns

    Availability

    The Collaboration Diagram provides the design pattern and the design pattern connector. With the connector, you can connect a design pattern to instances, multi objects, active objects, and actors. In a Collaboration Diagram, these symbols play a role for the design pattern.

    See Patterns (in the Class Diagram's description) for more information about patterns in the UML suite.

     

       
    67 次浏览       28
     
    相关工具

    文档生成器(DocGenerator)
    代码工程师 Code Engineer
    模型检查器 Checker
    WebEA
    自动建模器(AutoModeler)
     
    相关文章

    ASPICE 4.0 过程指南
    采用SysML对FPGA逻辑单元进行建模(对应到VHDL代码)
    DoDAF建模图例(EA+UPDM)
    EA集成第三方工具:Polarion、JIRA、AzureDevOps
    UML建模指南(建模工具iSpace)
     
    相关课程

    ASPICE4.0核心开发过程指南
    使用NML进行系统分析与建模
    基于UML和EA进行系统分析设计
    业务建模与业务分析
    基于SysML和EA进行系统设计与建模

    最新活动计划
    人工智能.机器学习TensorFlow 5-22[北京]
    AI智能化软件测试方法与实践 5-23[北京]
    图数据库与知识图谱 5-22[北京]
    DeepSeek大模型应用开发 6-12[厦门]
    基于 UML 和EA进行分析设计 6-23[北京]
    嵌入式软件架构-高级实践 7-9[北京]
     
     
    最新文章
    在EA中内嵌文档- Artifact
    EA中模型视图
    EA中的实体关系图
    使用EA进行风险建模
    EA中的项目词汇表
    EA的模型导出或导入csv文件
    自定义表格(Custom Table)EA中使用
    Gap Analysis Matrix(差距分析矩阵)
    更多...   
    MBSE工具
    MBSE平台
    建模工具 EA
    模型库-Model Center
    需求管理-ReqManager
    自动建模-Modeler
    多级仿真-Sys Simulator
    代码工程-Code Engineer
    文档生成器-DocGenerator
    更多...   
    成功案例
    广汽研究院 SysML+EA+软件分析设计
    高合汽车研发部门 建模工具EA、WebEA、
    国汽智联 建模工具EA、模型库、WebEA
    亿咖通 MBSE工程体系与工具链咨询
    中航无人机 MBSE工具链
    吉利汽车 购买EA工具
    华科汽车零部件 购买EA工具
    东风岚图汽车 购买EA工具 以及EA定制开发
    更多...