How to draw a use case diagram when an actor can change the other actor's use cases?

自闭症网瘾萝莉.ら 提交于 2020-01-03 05:00:10

问题


Let's take a social group system as example;

  • Actors are the Admin and the Moderator.

  • Use Cases :

    ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ (Delete posts)
    ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎‏‏‎ /
    ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ moderator --- (Report Post)
    ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏⬆️
    ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ ‏‏‎ Admin --- (Manage roles)

  • Moderator's posts can be changed by admin, for example the admin can disable report posts for some moderators.

The question is : How to simulate the use case diagram for this situation ?


回答1:


There is nothing special to do, in a lot of cases the execution of an UC has impact on the system ... and this is the goal of these UCs.

So nothing special in the diagram, but in the textual description you can say the report was written by the moderator etc




回答2:


The fact that one actor can change another user's role (and thus make the user belong to another category of actors) is without any impact on the use case diagram.

Why ? Because a use case actor is a classifier. So, it does not represent the occurence of a user (i.e. a concrete user who's role might change) but a class of users having the given role.

Also important to know, a use case does not represent a workflow. A use case represents goals that a user could have. The include and extend relations represent a relation between goals and not between actions of one and the same user. So if a user belongs to another actor class, he/she just have different goals and the old goals are no longer relevant.

If you mean to represent workflows, you should consider using activity diagrams (or non-UML BPMN diagrams). In these diagrams, you then need to foresee the course of action if the change of user role might influence the workflow.



来源:https://stackoverflow.com/questions/54804601/how-to-draw-a-use-case-diagram-when-an-actor-can-change-the-other-actors-use-ca

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!