【发布时间】:2014-07-18 00:15:21
【问题描述】:
大家好,我正在学习 UML,我需要有关用例的建议。我正在设计一个会员管理系统。国家管理员可以管理所有(子)组织和用户。我还创建了一个客户管理员,以便客户能够管理其(子)组织的用户。客户管理员无法管理组织,他只能看到他自己的(子)组织及其用户。我画了这个用例图:
我是这样写的:
--- BEGIN ---
Use-case name: Set Up Organization Tree
Description: Allow country admins or customer admins to set up the organization
structure. Country admins can see or update all members of their country. Customer
admins can see or update members of their own organization only.
Actors:
- Primary actor - Country admin
- Secondary actor – Customer admin
Basic-flow: Set up an organization structure in the country root
1) Log in
2) View organization tree
3) Create a new organization
4) Create a new user within the organization
5) Set the password of the user
6) 2 to 5 may repeat
7) Log out
Alternate fow: Set up user accounts within the existing organization
1) Log in
2) View organization tree
3) Create a new user within the selected organization
4) Set the password of the user
5) 2 to 5 may repeat
6) Log out
--- END ---
我不确定它是否正确。可以在基本流程中创建组织,因此它描述了国家/地区管理员可以做什么。在备用流程中,只能创建用户,因此它描述了国家管理员和客户管理员都可以做什么。但是客户管理员只能看到他自己的组织这一事实在这里不可见。此外,我不确定是否可以在单个用例备用流程中全部描述,或者是否应该创建两个单独的用例。一份用于国家/地区管理员,一份用于客户管理员。如果我为国家/地区管理员创建了单独的用例图,我想我不应该在那里提及客户管理员,然后我也不应该绘制客户管理员角色和角色概括? 非常感谢。
Vojtech
编辑 1:
这里是更新版本:
以及更新的场景:
--- BEGIN ---
Use-case name: Create New Customer Organizational Structure
Description: Allow country admin to create new organizational structure of the customer including users. Allow customer admins to create new users within the existing organizational structure. The country admin can see or update all members of the country. The customer admin can see or update users of his/her own organization only.
Actors:
- Country admin
- Customer admin
Basic-flow: Country admin creates new customer organizational structure
Pre-conditions:
- The country admin is logged in
- The customer organizational hierarchy doesn't exists in the Member Manager
Flow of events: Create New customer Organizational Structure
1) The country admin views the organization tree
2) The country admin creates a new organization
3) The country admin creates a new user within the organization
4) The country admin sets the password of the user
5) 1 to 4 may repeat
Post-condition:
- Customer organizational hierarchy is created
- Customer users are created
- Each user has a password
Alternate fow: Country admin creates new user in the existing organizational structure
Pre-conditions:
- The country admin is logged in
- The country admin can see or edit all members of the country
- The customer organizational hierarchy exists in the Member Manager
- The user that is going to be created doesn't exist
Flow of events:
1) The country admin views organization tree
2) The country admin creates a new user within the selected organization
2) The country admin sets the password of the user
4) 1 to 3 may repeat
Post-condition:
- New users are created in the selected organization
- Each user has a password
Alternate fow: Customer admin creates new user in the existing organizational structure
Pre-conditions:
- The customer admin is logged in
- The customer admin can see or edit members of his own organization only
- The customer organizational hierarchy exists in the Member Manager
- The user that is going to be created doesn't exist
Flow of events;
1) The customer admin views organization tree
2) The customer admin creates a new user within the selected organization
2) The customer admin sets the password of the user
4) 1 to 3 may repeat
Post-condition:
- New users are created in the selected organization
- Each user has a password
--- END ---
在我的场景中现在有两个备用流量:
- Alternate fow: Country admin creates new user in the existing organizational structure
- Alternate fow: Customer admin creates new user in the existing organizational structure
有必要同时提及吗?它们与国家/地区管理员相同,是客户管理员的专业化。 我还提到,客户管理员只能看到他自己组织的成员,而国家/地区管理员可以在场景描述、前提条件和图表注释中看到该国家/地区的所有成员。这是应该的方式吗?
谢谢。沃杰科技
【问题讨论】:
-
这可能有助于登录/注销:stackoverflow.com/questions/19443682/…