uml - UML 状态图中具有多个事件的一种转换

标签 uml diagram transitions state-diagram

我们在学校学习行为状态图的转换具有语法:

list of events [guard condition] / list of actions



但是我在 Internet 上找不到任何使用多个事件进行转换的示例。真的有可能吗?如果是,它的行为如何?这是否意味着当此事件之一发生时(当然条件已满足),交易就实现了?

最佳答案

是的,转换可以由列表中的许多事件之一触发。您将使用这样的构造来避免状态之间的多条线,从而制作更整洁的图表。

这是 2.5 规范所说的:

14.2.3.9.2 Enabled Transitions

A Transition is enabled if and only if:

  • [ . . . ]

  • At least one of the triggers of the Transition has an Event that is matched by the Event type of the dispatched Event occurrence.



这些逻辑 OR 的转换以文本形式指定为转换上的逗号分隔列表,如 §14.2.4.9 中所述:
[<trigger> [‘,’ <trigger>]* [‘[‘ <guard>’]’] [‘/’ <behavior-expression>]]

关于uml - UML 状态图中具有多个事件的一种转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40327871/

相关文章:

uml - 如何在类图中对健康属性的测量进行建模?

mysql - 如何在 ER 图中重新创建层次结构?

diagram - 如何在序列图中指示数据库事务提交

css - 如何更改 CSS 中过渡的 "return"?

css - 如何增加宽度 :auto DIV's width by X pixels using pure CSS

c - C 的流行图表工具或方法

java - UML:如何在 Java 中实现关联类

java - 试图理解从类图到对象图的转换过程

android-activity - Activity 图中的模型参数化 API 调用

ios - UITabBarController 动画的转换委托(delegate)