UML State Machines, Local vs. External Transition

∥☆過路亽.° 提交于 2020-12-30 06:37:04

问题


As already asked in http://www.eclipse.org/forums/index.php/t/452409/ I am not sure I correctly got the meaning of local transition and I'd like to know whether I am using them with the right semantics or not

Are these two state machines equal?

State Machine with local transition

State Machine with no local transition


回答1:


Under UML 2.4.1, the first diagram shows a local transition from State1 on receipt of trigger where the second shows transitions between sub-states on receipt of trigger. An external transition from State1 would be shown by the arrow pointing out of State1 then curving back into it (Figure 15.48 of the superstructure specification).

Section 15.3.15 TransitionKind of the UML Superstructure 2.4.1 gives the semantics of internal, local and external transitions:

kind=local implies that the transition, if triggered, will not exit the composite (source) state, but it will apply to any state within the composite state, and these will be exited and entered.

As neither local nor transitions between sub-states will cause State1 to be exited, the diagrams show similar state machines - the difference being that from State1.3 the first machine will re-enter State1.3 (causing its exit and entry behaviours to be invoked) whereas the second will do nothing from State1.3 on trigger.



来源:https://stackoverflow.com/questions/14666095/uml-state-machines-local-vs-external-transition

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