“Action State” vs “State” in UML Activity diagram

和自甴很熟 提交于 2019-12-10 11:23:20

问题


I'm a newbie with UML and Microsoft Visio.
Today, I have a homework which I need to draw an activity diagram in an UML project. My team use Visio 2003 to draw these diagrams.
When I open Visio and seek for Activity Diagram I see both Action State and State icon in the left panel, I'm very confused with the difference between them, then I post this question.
Sorry for my bad English


回答1:


From the UML 1.4.2 specification (section 4.13.2.1):

An action state represents the execution of an atomic action, typically the invocation of an operation.

ActionState has been replaced, as of UML 2.0, by Action. From section 12.3.2 of the UML 2.0 Superstructure specification:

Explicitly modeled actions as part of activities are new in UML 2.0, and replace ActionState, CallState, and SubactivityState in UML 1.5.

Read the 'Activities' section of the UML Superstructure spec for more information.




回答2:


Every such question about abstract syntax of UML can be answered by looking into the specification.

The official UML specification is released by OMG: http://www.uml.org/#UML2.0

By clicking around you get to the link to actual specification: http://www.omg.org/technology/documents/modeling_spec_catalog.htm#UML

Check out the UML Superstructure document: http://www.omg.org/spec/UML/2.3/Superstructure/PDF/

Now to your question - the superstructure document is split into parts (the second describes behaviours) and into chapters according to the aspect you are modeling - in your case Activities in chapter 12.

There are several sections - abstract syntax, class descriptions and diagrams. In abstract syntax, you can find a diagram showing that 'State' is imported from Statemachines, so you have to look it in the corresponding chapter. Action State isn't in the document.



来源:https://stackoverflow.com/questions/6465711/action-state-vs-state-in-uml-activity-diagram

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!