简介 / IntroductionThe easiest kind of transition to get wrong in a state machine is an arrow pointing back at its own state. The UML specification splits these into two categories: an external ...
简介 / Introduction状态机里最容易画错的一类转换,是指回自己的箭头。UML 规范把这种转换分成两种:外部自转换(A --> A)画成一个绕回自身的回环箭头,它会先退出状态再重新进入,因此 exit 和 entry 动作都会触发;而内部转换(internal transition)则完全不离开状态,只在状态内部发生一次自我触发,不触发 exit / en...
IntroductionThe easiest thing to get wrong in a state machine diagram is multiple transitions leaving the same state. If Payment can become either Paid or Payment failed, the arrows alone tell the ...
简介状态机图上最容易画错的是从同一个状态出发的多条转换。如果 支付中 既可能变成 已支付、也可能变成 支付失败,光看箭头读者根本不知道该走哪条——除非你在箭头上写清楚”什么条件下走这条”。这个条件就是守护条件(guard)。
UML 规范里守护条件的写法是在转换标签上用方括号括起来:[amount <= 1000]。两个引擎都认这个约定,但支持深度差别很大:PlantUML 能画出真正...
IntroductionA “time event” is one of the most frequently overlooked semantics in UML activity diagrams: a waiting activity does not wait forever, it is interrupted by a time condition and takes a d...
简介「时间事件」是 UML 活动图里最常被忽略的一类语义:一个等待中的活动并非永远等待,而是被某个时间条件打断并走向另一条分支。审批单 5 分钟没人处理就自动通过、缓存 30 秒未命中就回源、重试 3 次后放弃——这些都是时间事件。
问题在于,PlantUML 和 Mermaid 都没有一个 timeout 关键字可以直接写”5 分钟后触发”。本文用两个引擎各自最自然的方式把同一件事画出来,...
简介 / IntroductionIn UML activity diagrams, a signal represents an asynchronous, broadcastable event notification: the sender emits the signal and immediately continues its own flow without wai...
简介 / Introduction在 UML 活动图里,信号(Signal) 表示一次异步的、可广播的事件通知:发送方发出信号后立刻继续自己的流程,不等待对方回应;接收方在后续任意时刻捕获该信号并做出反应。它和「调用(call)」的区别在于没有同步的返回箭头。
PlantUML 用 -> SIGNAL_NAME; 直接发出信号;Mermaid 没有专门的信号概念,只能用虚线箭...
简介 / IntroductionSequence diagrams often need to say “a lot of time passed here”: a request goes out and the answer arrives 30 minutes later, or two systems poll each other on an interval. Pla...
简介 / Introduction时序图里经常需要表达”这里等了很久”:请求发出后,对端过了 30 分钟才回话,或者两个系统之间存在一段轮询间隔。PlantUML 为此提供了一个专门语法:单独一行的 ... 表示”时间流逝”,后面还能跟上文字说明。Mermaid 则没有对应的原生语法,需要用 Note 或虚线消息来近似表达。本文用一个支付回调场景对比两者的写法。
PlantUML ...