gpt4 book ai didi

oop - 用例图 : Does an included use case have to be triggered by the base use case?

转载 作者:行者123 更新时间:2023-12-05 01:30:48 24 4
gpt4 key购买 nike

如果我有一个 Actor 调用用例,例如“创建缺席”,每次 Actor 创建缺席时,他们都需要“ Search For Employee” 使用includes 关系对此进行建模是否正确?

这是include的所有解释都不清楚的地方,include的用例是不是必须由base自动触发,还是可以用来表示每次创建缺席用户都会一直搜索一名员工。

或者,是否应该将这两者建模为调用的参与者并且它们之间没有包含关系?

最佳答案

标准明确,来自formal/2017-12-05 § 18.1.3.3 包括第 641 页:

Include is a DirectedRelationship between two UseCases, indicating that the behavior of the included UseCase (theaddition) is inserted into the behavior of the including UseCase (the includingCase).

All of the behavior of the included UseCase is executed at a single location in the included UseCase before execution of the including UseCase is resumed.

所以:

  • does the included use case have to be triggered automatically by the base : 是的,即使这样说也不完美,因为 included UC 不是 triggered 但是它的行为插入了

  • 是否可以用来表明每次创建缺勤时用户总是会搜索员工:否,如果 UC Create Absence 包括 UC 搜索员工,然后用户将不会搜索之后,而是搜索期间

  • 使用包含关系对此进行建模是否正确?:否

  • 或者是否应该将这两个建模为调用的 actor 并且它们之间没有包含关系?:是的,请注意您可以在 UC Create Absence 说 Actor 将不得不寻找员工

关于oop - 用例图 : Does an included use case have to be triggered by the base use case?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66758654/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com