UML 状态机 - 具有入口事件的复合状态中的显式入口

标签 uml state-machine

我有一个关于 UML 状态机图的问题。

来自 UML 2.5 规范,“14.2.3.4.5 进入状态”,p. 307f.

Explicit entry: If the incoming Transition or its continuations terminate on a directly contained substate of the composite State, then that substate becomes active and its entry Behavior is executed after the execution of the entry Behavior of the containing composite State. This rule applies recursively if the Transition terminates on an indirect (deeply nested) substate.

e 成为我们的显式入口,这意味着对于给定的情况,A1(即 x)的入口事件被执行在 A(即 y)的进入事件之前,对吧?还是相反?

Diagram

谢谢。

最佳答案

Let e be our explicit entry, this means for the given situation that the entry activity of A1 (which is x) is executed before the entry activity of A (which is y), right? Or is it the other way round?

不,这是相反的(它的入口行为在之后执行包含复合状态的入口行为)所以xy

之后执行

这是合乎逻辑的,您在进入A1 之前输入A(您在进入大楼之前进入大楼)。在退出时,这当然是相反的,你先从 A1 退出,然后从 A

退出

关于UML 状态机 - 具有入口事件的复合状态中的显式入口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55796621/

相关文章:

uml - 如何在 uml 序列图中表示 "sub-sequences"?

components - UML 中定义接口(interface)但不要求或提供接口(interface)的组件

c# - C# 中的简单状态机示例?

java - 多级和分层状态机的设计

比较(目标)C 中的枚举数组

java - Enterprise Architect 与代码同步

java - 如何将 Java 配置文件添加到 Eclipse 的 Papyrus 2.0.0 插件?

finite-automata - DFA 可以有 epsilon/lambda 转换吗?

swift - 请求 GKStateMachine 的简单示例?

uml - 如何指定类的唯一标识符