UML 用例:等待另一个用例完成 [英] UML Use case: Waiting for another use case to finish
问题描述
我正在尝试为一个用例建模,基本上它是在问答节目中播放一轮的方式.用例中的参与者是测验大师;他向参与者提问.
I'm trying to model a use case, basically it's how a round is played in a quiz-show. the actor in the use case is the quizmaster; he asks the questions to the participants.
在这个用例中发生了很多事情,但我的问题归结为测验大师必须等待玩家按下按钮并回答他提出的问题以便对其进行判断(对或错误).
There's a lot going on in this use case but my problem comes down to the point where the quizmaster has to wait for a player to buzz his button and give an answer to a question he has asked so it can be judged (Right or wrong).
演员候选人"遵循一个单独的用例来回答测验大师提出的问题.
There's a seperate use case the actor "Candidate" follows to answer the question the quizmaster has asked.
我如何模拟测验大师必须等待另一个参与者完成用例才能继续他自己的用例的事实?或者最好将它们全部分成更小的用例.不过我的老师建议不要这样做,所以我在这里寻求第二意见.
How do I model the fact that the quizmaster has to wait for another actor to do a use case before he can continue with his own use case? Or is it better to just seperate them all into smaller-sized use cases. My teacher advised against that though so I was looking for a second opinion here.
推荐答案
您可以按照 user3934037 的建议进行包含,也可以将其设置为单独的用例并使用前置/后置条件在那种情况下,你会有用例
You can either do an include as user3934037 suggested, or you could make it separate usecases and work with the pre/postconditions In that case you would have usecases
提问
-> 前提条件:考生准备好
-> precondition: Candidates ready
-> 后置条件:提出问题
-> postcondition: Question asked
回答问题
-> 前提:提出问题
-> 后置条件:问题已回复
-> postcondition: Question responded
裁判回复
-> 前提条件:已回答问题
-> precondition: Question responed
-> 后置条件:响应判断
-> postcondition: Response Judged
不是按顺序将用例链接在一起,而是让它们彼此独立.用例判断响应"不是等待特定用例完成,而是等待先决条件得到满足,但结果是这样.
Instead of linking use cases in a sequence together you leave them independent of each other. Use Case "Judge Response" isn't waiting for a specific use case to finish, it is waiting until it preconditions are met, however that came to be.
总的来说,我建议在用例分析之外保持执行顺序(并将其留在业务流程建模中)
In general I advise to keep order of execution out of use case analysis (and leave it in business process modelling)
这篇关于UML 用例:等待另一个用例完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!