UML state diagrams with draw.io
https://about.draw.io/uml-state-diagrams-with-draw-io/
State diagrams have been used in programming to describe the various possible states that a system can be in for decades. They also quickly show which states lead to each other, and what triggers a change of state.
Of course, you can use these diagrams for anything system or process that has various states – library books, a publishing process, even punishment and reward states for your kids. They are very similar to flow diagrams, but UML has a notation specifically for state diagrams, which they also call state machines or statecharts.
Components of UML state diagram
UML state diagrams use a notation that you may have already seen in our UML activity diagrams.
- Start state: A solid circle.
- End state: A solid circle with a ring around it.
- State: A rectangle with rounded corners, with the name of the action.
- Transition: Connector arrows with a label to indicate the trigger for that transition, if there is one.
- State with internal activities: A state with a horizontal line, and the actions listed in the bottom half.
- Composite state: A state with a horizontal line, and a nested state diagram (or link to another draw.io page) in the bottom half.
- Guards or conditions: A diamond.
- Fork: A thicker line with one transition incoming and two or more outgoing. 一个输入,多个输出
- Join: A thicker line with more than one transition incoming and only one outgoing. 多个输入,一个输出
Tip: UML 2 state diagrams use the clear black/white shapes, and UML 1 has yellow shapes with a red outline. I personally find UML 2 easier to read.
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2019-01-08 C# 处理base64 以及base64的原理分析
2019-01-08 PBKDF2加密
2019-01-08 git checkout cannot stat permission denied
2016-01-08 Types of Entity in Entity Framework:
2016-01-08 DBContext
2016-01-08 Model Browser
2015-01-08 只运行一个应用程序的错误代码的分析