UML状态图在DO和输入之间的差异
我真的不明白进入和进行UML状态图中的活动之间的区别
如果我的状态称为CREATE帐户,并且该州要求用户输入他的姓名,ID和密码,
则 活动 ?
i really don't understand the difference between entry and do activities in UML state diagram
if i have state called create account and this state ask from user to enter his name,id and password
so enter name , id , password is entry activity or do activity ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不同之处在于,进入行为始终运行到完成,而DO行为仅在没有事件触发过渡的情况下才能完成。此事件将被打断。因此,它可能具有无尽的循环。如果效果 - 或出口行为具有如此无尽的循环,则statemachine将不再对事件做出反应。
作为旁注:
创建帐户
不是状态的好名称,因为它包含一个活动动词。这更适合一项活动。状态可以命名创建帐户
。入门行为可以是创建帐户
,这可以包括操作输入名称
,输入ID 和输入密码
。您还应该对用户取消创建的可能性进行建模。与Guards[帐户创建]
和[取消]
的两个完成过渡可以显示接下来会发生什么。The difference is that the entry behavior is always run to completion, whereas the do behavior is only run to completion if no event triggers a transition. It will get interrupted by this event. Therefore, it could have an endless loop. If an effect-, do- or exit-behavior has such an endless loop, the statemachine will not react to events anymore.
As a sidenote:
create account
is not a good name for a state, since it contains an active verb. That is better suited for an activity. The state could be namedcreating account
. The entry-behavior could becreate account
and this could include actionsenter name
,enter id
andenter password
. You should also model the possibility, that the users cancels the creation. Two completion transitions with guards[account created]
and[canceled]
could show what happens next.