Reputation: 459
Our app support team is suggesting to implement audit trail, extensive error logging and a new batch job to process some data internally. Before implementing this, I want to make changes in my use case diagram. I think audit trail must be an use case but not sure about the error logging. Should it be considered as an use case. This link http://www.umlchannel.com/en/uml/item/24-use-case-actor-system-timer is saying an use case sometimes may have NO actor. Can we consider error logging as an use case without an actor? Can I consider a batch job as an use case where batch scheduler as an actor?
Another clarification I need is : I know actor can be a person or another system. Can we consider an event (that interact with a solution through use case) as an actor?
Upvotes: 2
Views: 920
Reputation: 36323
A use case must have an actor, since basically it just describes the added value for its actor. The author of the referenced article is simply wrong here.
P. 637 of the UML 2.5 specs:
Each UseCase specifies some behavior that a subject can perform in collaboration with one or more Actors.
...
A subject of a UseCase could be a system or any other element that may have behavior, such as a Component or Class. Each UseCase specifies a unit of useful functionality that the subject provides to its users
N.B.: Though the UML is the "true source", it's not a good read about use cases. Instead I highly recommend Bittner/Spence.
There are several ways to approach the Log error
"use case". One would be to <extend>
use cases with Log error
. But actually, there are a couple of drawbacks with this. Log error
might give additional value in the long term (system improvements and bug corrections), but it is not an a-priori added value. Also you would just clutter your use case diagrams.
A second way is to change the perspective and include the "system" itself as an actor. But this is an anti-pattern. So not recommended as well.
Finally, you could simply add a non-functional requirement to your system and just trace to the use cases which are relevant. This is what I'd recommend to do.
Your additional questions:
Upvotes: 1