Composite State with History

 

The Composite State with History Pattern describes an entity (e.g. Class, Actor, Use Case or Test Case) from the point of view of the important states that it exhibits. An Entry is an optional behavior that is executed whenever a tate is entered regardless of the transition taken to reach the state.

Figure 1. A state machine diagram showing two states and two transitions and an initial Psuedostate and a Final State. A number of Sub-states have been defined that are nested in the enclosing State. A History State serves to return to the Sub State that was active at the time the exiting transition (Transition A) fired.  The Transition exiting the History psuedostate is a default in the event that the machine can not identify which Sub State was active.

 

历史复合状态图

除非另有指定,bai当转移进入复合状态时,嵌du套状态机的操作将从zhi初始状态开始重新执行(dao除非转移直接以子状态为目标)。历史状态使状态机可以重新进入在它退出复合状态之前的最后一个活动子状态。

当软件工程师想要定义或描述类或其他元素可能显示的一组离散状态时,可以使用该模式。它们通常用于分析系统某些部分的行为,通常是因为难以理解或其行为复杂。

下面列出了使用此模式时可能需要执行的一些操作:

1.重命名包、状态机和关系图以适合该方案。

2.重命名图中的状态和转换,以适应计划。

3.通过从工具箱或项目浏览器拖到图表上来创建新的状态、其他元素和转换。

4.将显示更改为状态表。

作用是创建有助于将图表中包含的信息传播给其他团队成员的文档。

Nested States

 

The Nested States pattern describes a Class or other element that has a number of States one or more of which themselves have states (sub states). The pattern allows these states to be displayed on the same diagram.

嵌套的状态

嵌套状态模式描述了一个类或其他元素,该类或元素具有多个状态,其中一个或多个状态本身具有状态(子状态)。模式允许这些状态显示在同一个图表上。

其目的是允许软件工程师和其他涉众在一个图表上创建两个(或更多)状态转换级别的可视化表示。

当执行转换的遍历以了解所属元素的行为时,或者当将嵌套状态放置在同一个图上时,这种表示通常很有用,无需单击组合图就可以更容易地理解状态之间的转换。

重命名图中的状态和转换以适合计划。

新状态、其他元素和连接器可以从工具箱或项目浏览器拖到图表上。

Complete State Machine

 

The Complete State Machine Pattern describes an entity (e.g. Class, Actor, Use Case or Test Case) from the point of view of the important states that it exhibits. When a state is entered an entry Action can be fired and while in the state a do action can be fired and upon leaving the state an exit action can be fired.

完整状态机

完整状态机模式从它所展示的重要状态的角度描述了一个实体(例如,类、参与者、用例或测试用例)。当进入一个状态时,一个进入动作可以被触发,而在这个状态下一个do动作可以被触发,离开状态时可以触发一个退出动作。

提供一种机制来表示系统工程师或其他涉众认为在块或其他元素的生命周期中很重要的条件(状态)。它描述了状态相关的行为,显示了元素如何从一个状态转换到另一个状态,以及在元素处于该状态期间调用了哪些活动。

当软件工程师想要定义或描述块或其他元素可能显示的一组离散状态时,使用该模式。它们通常用于分析系统某些部分的行为,通常是因为难以理解或其行为复杂。

用于:

1.重命名图中的状态和转换以适合您的计划。

2.新状态、其他元素和连接器可以从工具箱或项目浏览器拖到图表上。

One Class Executable State Machine

 

The One Class Executable State Machine pattern creates elements and diagrams that model the important states in the lifetime of a Class allowing code to be automatically generated that can be included in the implementation of a system in a range of programming languages.

一类可执行状态机:

单类可执行状态机模式创建元素和图表,这些元素和图表为类生命周期中的重要状态建模,从而允许自动生成代码,这些代码可以包含在一系列编程语言的系统实现中。

模式的目的是对类中的重要状态建模,并以各种语言生成编程代码,这些语言可以被合并到系统中。可以模拟状态机,允许各种利益相关者可视化机器如何、为什么以及何时从一种状态转换到另一种状态。

模式通常是在一个计划的分析或实现阶段创建的,该计划用于在系统中的一个或多个重要类的生命周期中建模状态。但是,它也可以在支持阶段使用,以尝试和理解在测试或生产中运行的系统中存在的复杂问题。

在可执行模拟中可视化转换的能力允许建模者或设计者对复杂且通常难以解决的问题进行推理。

下面是在使用此模式时可能需要做的一些事情的列表:

1.更改类的名称和类(属性)的实例,以适应该主动性。

2.更改状态和事件的名称,并根据需要重新指导转换,以适应计划。

最新文章

  1. 基於tiny4412的Linux內核移植--- 中斷和GPIO學習(3)
  2. oracle 身份证校验函数
  3. JavaScript 详说事件机制之冒泡、捕获、传播、委托
  4. PHP内置函数file_put_content(),将数据写入文件,使用FILE_APPEND 参数进行内容追加
  5. Android多进程需要注意的一个地方
  6. [BZOJ 4436][Cerc2015]Kernel Knights
  7. R语言实战读书笔记(三)图形初阶
  8. 单点登录CAS使用记(三):实现自定义验证用户登录
  9. 认识cocos2d-x jsbinding
  10. 专注于HTTP的高性能高易用性网络库:Fslib.network库
  11. UML的基本图(一)
  12. Remote验证及其改进(附源码)
  13. Flask-uploads 简单使用
  14. Python3中无法导入ssl模块的解决办法
  15. On the structure of submodule of finitely generated module over PID
  16. Python基础之多态与多态性
  17. oracle 中可以用 case when then else end来处理除数是0的情况
  18. 3D打印机如何添加自动调平功能
  19. 浅谈 OpenResty
  20. github issues的操作

热门文章

  1. VMware安装Centos7并联网使用
  2. 数据库增量备份,恢复innobackex
  3. 不定方程(Exgcd)
  4. stp域中两台switch互联接口出现两口均为root口 并且在现有stp区域中无法确定根桥设备位置;分析其原因并赋予解决办法
  5. vue中配置axios.js文件,发送请求
  6. JELLY技术周刊 Vol.23: Vue3 是伟大航路上的 One Piece 么?
  7. Bottleneck靶机渗透
  8. 干货满满!关于Pycharm远程开发
  9. 微服务实战系列(八)-网关springcloud gateway自定义规则
  10. 适配器(adapter)与fragment之间、fragment与activity之间的通信问题