Use Case Design with the Actor Sean Connery and his Roles
A real life example will help us understand use case design. The question is "What is the difference between the concepts role and actor? Sean Connery is a world renowned professional actor who has played multiple roles in his career. You should begin to understand the important distinction between role and actor for use case modeling as we walk through this discussion. The concept of role is intimately connected to the concept of system. This will become clear. These diagrams were designed with Rational Rose, IBM's use case modeling tool.
Sean Connery Roles
This diagram shows Sean Connery as an instance of the class Human Being, although that is not explicitly shown on this diagram for simplicity. Sean's relationship to three different systems is diagrammed using actors. Several roles Sean Connery played as an actor are then modeled.

James Bond Movies - Take 1
Sean Connery played James Bond in several movies. We look at two of them, From Russia with Love and Goldfinger.In both these movies the actor Sean Connery plays the role James Bond. We could model this actor-role relationship this way:

However, these are not really the same role. Each movie is a separate system in the movie business. As a result, it is not accurate to say that the James Bond role is the same for each movie.
James Bond Movies - Take 2
This use case design diagram clarifies the two different roles. The distinction comes by naming one role, James Bond in From Russia with Love, and the other role, James Bond in Goldfinger.

Goldfinger Movie System
Let's drill down into the Goldfinger movie. We show two different roles related to the Goldfinger movie, namely, James Bond in Goldfinger and Henchman #3.In the movie world, the movie system is subdivided into scenes or subsystems. Each scene stands on its own. It is has its own lines, set, props, etc. It is filmed separately from other scenes.

This might seem like an accurate diagram at first glance. However, Henchman #3 does not appear in all the scenes. In fact, he has a bit part in just one scene.
Drive in Car Chase Use Case - Role Name Notation
One way to notate roles in UML use case design is to name the association end on the relationship line from the role to the use case. This is accurate. However, it results in cluttered diagrams.

Another problem is that multiple actors could play the same role. As a result, a role name can appear multiple times on the same use case design diagram. This could easily lead to missed requirements.
A Familiar Problem?
Did you notice that we have a similar problem as James Bond Movies - Take 1 above? Here there are two actors and two roles for the same use case. This is a problem. Remember the Building Requirements Consensus™ Methodology asserts that there is only one role per use case.Just as the James Bond role was split into James Bond in From Russia with Love role and the James Bond in Goldfinger role, we must split here. However, it is the use case that is split here. Why? Because there are two different behaviors with two very different results or goals. James Bond must survive or it is a short movie. Henchman #3 will have a spectacular crash so there can be special effects. The use case he will play the role of will be something like Fly Over the Cliff and Explode in Midair.
Survive Car Chase Use Case - «Role» Stereotype Notation
Let's focus on the Survive Car Chase use case. We can solve one issue by abstracting out the role into a class notation, the box, with a stereotype «role». Now each role is unambiguously modeled.

A downside to this use case design approach is that diagrams get much larger to document the same information.
Survive Car Chase Use Case - Interface Notation
We were stuck at this point for weeks. The direction of explicitly documenting roles reduced ambiguity but the notations were not satisfactory.One night a new idea came. Could interface notation with use cases? "It should work" we thought. "Use cases are classifiers in UML and all classifiers can have interfaces." We had not seen this usage for interfaces before but it sure seemed right. We opened Rational Rose and successfully added an interface to a use case. Viola, it worked!

Now there is a clean, diagrammatically correct way to document use case roles. It was there all along. We just did not know it!
UML 2.0 Ball and Socket Interface Notation
UML 2.0 introduced a ball and socket notation for interfaces. This notation could be used to eliminate the historically awkward extend and include notations. People always ask "Why do the arrows go in different directions?"Include could use the socket. The open notation implies that the use case needs something to deliver its benefit of value. Extend could use the ball. This closed notation implies that the use case offers a service, namely an extension point, that others can use. Now we have a notation to graphically document use case design as plug and play use cases that were designed to work in a
SOA environment.
Who Plays James Bond?
What if we wanted to discuss James Bond from an entirely different perspective? For example, we might want to discuss the "James Bond phenomenon" or "Hollywood series successes". In this diagram, we document Hollywood cash cows. We focus on the generic role James Bond. We do not care about specific James Bond roles over time or even the specific movies. In this system, we look at the larger cultural phenomenon. Just for fun, we include the names of all the actors who played the James Bond role on the left side of the diagram.

From Use Case Design Illustrated by Sean Connery Roles to Use Case Basics 101 Roles
From Use Case Design Illustrated by Sean Connery Roles to Building Requirements Consensus™ Home

|