使用 uml 序列图设计操作 [英] designing an operation using uml sequence diagram

查看:40
本文介绍了使用 uml 序列图设计操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 UML 序列图设计这个操作?

How to design this operation using the UML sequence diagram?

场景:

任务(控制任务)在数据库上添加一行,计算机(控制计算机)循环获取数据库的完整行,当它在数据库(实体任务)中检测到新添加的行时,它获取 IP从数据库(Entity Server)中获取服务器(Controler Server)的地址和端口号,然后发送消息.

The Tasks (Controler Task) adds one line on the database, the Computer (Controler Computer) gets in loop the full lines of the database and when it detects a new added line in DB (Entity Task), it gets the IP address and the port number of the server (Controler Server) from the database (Entity Server) and then sends the message.

有什么绝妙的建议吗?

非常感谢!

推荐答案

操作是行为特征.它没有行为定义.如果定义了操作,则意味着通常在分类器(或专用分类器)的上下文中定义了可以被操作调用的行为.操作和行为通常是相互关联的.操作扮演行为规范的角色,行为是一种方法,分类器的实例将如何表现.要定义行为,请使用一些行为图(Activity、StateMachine、Interaction ...)您提供的描述主要对应于活动.

Operation is behavioral feature. It has no behavior definition. If operation defined, it means, that there is usually a behavior defined in context of classifier (or specialized classifiers) which can be invoked by operation. Operation and behavior are usually connected. Operation plays role of specification of behavior and behavior is a method, how instance of classifier will behave. To define the behavior, use some of behavioral diagrams (Activity, StateMachine, Interaction ...) Descrition that you provided mostly corresponds to Activity.

这篇关于使用 uml 序列图设计操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆