This site uses cookies to deliver our services. By using this site, you acknowledge that you have read and understand our Cookie and Privacy policy. Your use of Kontext website is subject to this policy. Allow Cookies and Dismiss

VS2010新特性-Modeling Project-UML Activity Diagram 活动图

708 views 0 comments last modified about 9 years ago Raymond Tang

In this page

顾名思义,活动图就是用于展示系统内部的活动的以及它们之间的相互关系;它显示了系统中从一个活动到另一个活动的流程,强调的是对象之间的流程控制。

一,新建活动图

选中ModelingProjectTest,右键|Add|New Item|Installed Templates|Modeling|UML Activity Diagram,输入文件名称UMLActivityDiagramTest.activitydiagram,点击Add按钮,即建立了一个空的活动图。


二,活动图包含的内容

从Toolbox工具箱中我们可以看到活动图可以包含以下元素:


各种元素说明如下(一些语句描绘有可能不是很准确):

Initial Node

添加一个初始节点,活动开始

Activity Final Node

添加一个活动结束节点

Action

添加一个活动的单一步骤

Object Node

添加一个节点,这个节点可以传送、缓存、过滤、转换对象

Comment

添加备注

Decision Node

添加一个节点,在节点处将输入线程将载入几个交替的流,可理解为流程中的判断

Merge Node

添加一个节点,在节点处交替的流将会合并为一个输出流

Fork Node

添加一个节点,任何输入线程将会分化为几个并发的子线程

Join Node

添加一个节点,在节点处几个并发的子线程将会合并在一起

Send Signal Action

添加一个步骤,该步骤会向其他系统或者活动发送信号

Accept Event Action

添加一个步骤,该步骤等待信号或者事件

Call Behavior Action

添加一个步骤,该步骤会调用另一个活动

Call Operation Action

添加一个步骤,该步骤调用一个操作

Input Pin

为一个步骤添加输入Pin,它会允许数据流入该步骤

Output Pin

为一个步骤添加输出Pin,它会允许数据从该步骤流出

Activity Parameter Node

创建一个参数,用于传输数据到活动或者从活动传出数据。

三,实现活动图

下面对http://hi.baidu.com/1987raymond/blog/item/8a60ae58a7b892d69c82048c.html中的活动图转移到VS2010中来,如下图所示:


在上面的活动图中,大致描绘了整个从ATM上取钱的流程,活动开始|插入卡|输入密码|验证密码|其它工作|取卡|活动结束。我们可以发现,在整个流程中实际上有几个Actor在执行这些活动中的步骤:比如ATM、用户。

Related pages

ASP.NET Core 2 with Bootstrap 4 Bundler Minifier Issue: Expected semicolon or closing curly-brace found '-'

766 views   1 comments last modified about 7 months ago

Background When upgrading Bootstrap to v4.0.0 release, the bundler and minifier doesn’t work properly due to CSS variable is commonly used: :root{--blue:#007bff; About 26 errors will show up in the Error List with the following message: ...

View detail

Migrate ASP.NET Core Projects – VS2015 to VS2017 and TFS2015 to TFS2017 Issues and Fixes

423 views   0 comments last modified about 2 years ago

Context Before Visual Studio 2017 was released, I was implementing my ASP.NET Core project using VS2015. TFS2015 is used for Continuous Build and Deployment for my projects. After migrating to VS2017, there are couple of issues I encountered in my environment: VS2017 has ...

View detail

Understand Code Dependencies with Visual Studio

554 views   0 comments last modified about 4 years ago

Visual Studio provides a convenient tool to generate visual code dependencies. It helps to identity circular references issues and also hubs. To learn more details about this function, visit ...

View detail

开始下载安装Visual Studio 11 Beta吧!

247 views   0 comments last modified about 7 years ago

  ...

View detail

Visual Studio 2011 New Features 新增特性汇总

257 views   0 comments last modified about 7 years ago

本文将介绍Visual Studio 11 Express for Windows Developer Preview中包含的新特性。

View detail

VS2010新增的IDE特性与功能之C#程序员篇

278 views   0 comments last modified about 9 years ago

注:本文参照MSDN博客C# FAQ的文章http://blogs.msdn.com/csharpfaq/archive/2010/05/10/new-ide-features-in-visual-studio-2010-for-c-developers.aspx;但不是完整翻译,而是提取主要内容以供大家参考,感谢原作者的奉献。一,Generate From Usage 从使用生成代码

View detail

Add comment

Please login first to add comments.  Log in New user?  Register

Comments (0)

No comments yet.