简体   繁体   English

UML用例图的参与者数量

[英]UML Number of actors of a Use Case diagram

Is it possible for a use case to have more than one actor? 用例是否可以有多个角色? And if it is, do you know of a good reference where I can find that information (book, webpage) because I am having a problem with a diagram I made for a test. 如果是这样,您是否知道一个很好的参考资料,可以在其中找到该信息(书籍,网页),因为我在为测试制作的图表时遇到了问题。 Thanks. 谢谢。

Yes, a use case can have associations to multiple actors 是的,一个用例可以与多个参与者相关联

The only true source for this information is the UML specification on uml.org 此信息的唯一真实来源是uml.org上的UML规范

From UML 2.5 beta2 -> 18.2 Classifier Descriptions -> Actor -> Constraints 从UML 2.5 beta2-> 18.2分类器描述-> Actor->约束

  • associations 协会

An Actor can only have Associations to UseCases, Components, and Classes. 演员只能与用例,组件和类建立关联。 Furthermore these Associations must be binary. 此外,这些关联必须是二进制的。

 inv: Association.allInstances()->forAll( a | a.memberEnd->collect(type)->includes(self) implies ( a.memberEnd->size() = 2 and let actorEnd : Property = a.memberEnd->any(type = self) in actorEnd.opposite.class.oclIsKindOf(UseCase) or ( actorEnd.opposite.class.oclIsKindOf(Class) and not actorEnd.opposite.class.oclIsKindOf(Behavior)) ) ) 

There are no constraints relative to the relation to the actor on the side of the use case 在用例方面,相对于与参与者的关系没有任何约束

Although the UML spec allows to use multiple actors an despite the fact that I have used primary and secondary actor(s) in use cases in the past I have come to the conclusion that a use case shall have only a single actor. 尽管UML规范允许使用多个参与者,但是尽管我过去在用例中使用过主要和次要参与者,但我得出的结论是,一个用例只能有一个参与者。 When you go down to that paradigm you will find that the use case cut is much easier and clearer than when using multiple actors. 当您使用该范例时,您会发现用例剪切比使用多个参与者更容易和清楚。 Please see the following slides that explain this in more detail: http://de.slideshare.net/putchavn/usecase-case-is-a-dialog-not-a-process 请参阅以下幻灯片对此进行更详细的说明: http : //de.slideshare.net/putchavn/usecase-case-is-a-dialog-not-a-process

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM