我是UML的新手,我正在尝试记录我的软件开发过程。我用PlantUML制作了下图:
在内部状态中,我想表明一旦他们各自的发布(即次要/补丁),应该返回下一个最高级别的状态。
例如,在PatchRelease
之后,Patch
应退出EvalStory
。同上MinorRelease --> EvalEpic
。我应该如何展示这个? (提供PlantUML代码的答案不是必需的,但会很好)
[*] --> Major
state Major {
[*] --> CreateEpic
note right : An 'Epic' describes the set of desired\nfeatures the end-user would like to see
CreateEpic --> EvalEpic
EvalEpic --> Minor : unfulfilled
EvalEpic --> MajorRelease : fulfilled
MajorRelease --> [*]
state Minor {
[*] --> CreateStory
CreateStory --> EvalStory
EvalStory --> Patch : unfulfilled
EvalStory --> MinorRelease : fulfilled
MinorRelease --> DeployLive
state Patch {
[*] --> Testing
Testing --> DeployTest
DeployTest --> EvalTest
EvalTest --> Testing : bugs found
EvalTest --> PatchRelease: no bugs found
state Testing {
[*] --> WriteTests
WriteTests --> RunTests
RunTests --> WriteCode: test(s) failed
RunTests -left-> WriteTests: tests passed
WriteCode --> RunTests
}
Patch --> EvalStory
}
Minor --> EvalEpic
}
}
答案 0 :(得分:2)
例如,在PatchRelease之后,Patch应该退出到EvalStory
这已经发生了,因为这是默认行为。
PatchRelease 完成后,其他任何地方都没有了,所以 Patch 完成了它的操作,然后你可以再次查看它,好像有 Patch 中没有状态。
如果你想要明确,你可以
您可以阅读进入/退出状态,例如http://www.uml-diagrams.org/state-machine-diagrams.html#exit-point-pseudostate
答案 1 :(得分:1)
在复合状态内的最后一个状态之后添加最终伪状态。
E.g。如果你添加代码
PatchRelease - > [*]
这意味着在完成PatchRelease后,整个Patch也会完成,因此它可以移动到下一个状态(即EvalStory)