File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Problem of Use Case Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Problem of Use Case" Watch "Problem of Use Case" New topic

Problem of Use Case


Joined: Mar 25, 2003
Posts: 1
I'm new to UML. I have a question on Use Case diagram.
There are 2 kind of HR staff. The first one is manager, and the other is officer.
Manager can add, delete, and modify staff record.
Officer can modify staff record and generate report.
Then, how many actor are there?
1 actor named HR staff?
2 actors: HR Manager and HR Officer?
Also, in my project, there are many sub-functions for different kind of user. If I use the second method, this cause many actors that may have overlap function. (ie. HR Manager and HR Officer, both have the function of modify staff record)
Any suggestion!? Thank you!
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Actors are roles, not titles. One human can play many roles - sales clerk, customer, supervisor, administrator, truck driver, etc. The mapping of roles to use cases should be fairly simple - not too many crossing lines. If there is some use case that every user can do (besides logon) maybe you just identified a role that every human can play.
Roles may wind up in the database to control entitlements - most users cannot play the supervisor role. Or they may have no significance beyond helping people understand who uses the system for what purpose. But don't expect your actors to wind up as classes! The system I'm on has many roles, but only one User class (which does NOT allow a User to be a Customer!)
Hope that helped.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: Problem of Use Case
It's not a secret anymore!