Actors

An actor represents a coherent set of roles that users of use cases play when interacting with these use cases [BRJ99]. Actors represent the role of the future users of the system. Actors model the user's perspective of the system. Actors are located outside the system; therefore, in order to depict actors, it is important to define the boundaries between actors and the system.

The UML symbol for an actor is shown in Figure 5-1. An actor has a name that distinguishes actors among them. It is a good modeling practice to name actors by the role they play, not by their names. The name of a person may change but this will not affect the role this person plays in the system.

Farmer

Farmer

Figure 5-1. The UML symbol for an Actor.

There are three primary types of actors: Users of the system, other systems interacting with our system, and time [BB02].

The first type of actor is a person or a user who will use the system. These are the most common type of actors. As an example, in a crop simulation scenario, a farmer will ask the system to run a simulation and therefore, the farmer is an actor.

The second type of actor is another system interacting with our system. For example, the crop simulation system obtains the weather data directly from a weather station on-line. In this case, the weather station is outside our system and it is not our intention to modify its behavior; therefore, the weather station is an actor.

The third type of actor is time. Time becomes an actor when after a certain period of time, a series of events to be handled by the system is triggered. As an example, an advisory system can be designed to function based on weather conditions. When weather conditions (temperature and humidity) favor development of certain diseases or fungus, the system will provide advice for starting spraying with appropriate pesticides.

The difference between actor and user of the system is rather subtle; a user is someone that uses the system, whereas an actor is a role that a user can play. A user can play several roles and therefore a user can be modeled as different actors.

Actors can be linked to each other using the generalization relationship. Figure 5-2 shows an example of generalization between actors. A Commercial Customer is a special case of a Customer, i.e., Commercial Customer inherits from Customer. Although actors are outside of the system and not the subject of our study, it is useful to know how they are structured and related, as it helps to understand how they communicate with the system.

Commercial Customer

Figure 5-2. Actors related using a generalization relationship.

Commercial Customer

Figure 5-2. Actors related using a generalization relationship.

0 0

Post a comment