Actor
Last updated
Was this helpful?
Last updated
Was this helpful?
Actors are the second of two primary objects in use case diagrams. They represent an entity, person or otherwise, that interacts that is involved with an action called a use case.
There are two methods for declaring actors. One method uses the command word actor. The other method requires placing the name of the actor between two colons.
Actors have eight properties. All are optional except name. The properties generally follow the below order.
name - the name of the entity, can be a person or object such as a database
business - determines if the actor is a business actor
alias - gives the ability to use a variable to identify the actor
stereotype - applies a stereotype text to the actor
fill_color - changes the interior color of the actor
line_color - determines the color of the line used to draw the actor
line_type - determines the type of line used to draw the actor
text_color - determines the color of the name and stereotype text
The business property may come before or after name. The last four properties follow a hash (#) sign and are separated by a semicolon (;) if more than one is used. The last three properties can be in any order so long as they are the last three.
The name is simply text that appears below the actor icon. The name can be a single word or it can be a string. Multiword strings must be inside of colons. The string method supports line breaks as well as markup for color and emphasis. You can define colors with a standard color name or hex code.
The business property is turned on by placing a forward slash after the actor key word or after the last colon around name. This simply adds a slash mark to the body of the actor icon. Make sure the forward slash is touching the character to its left with no space between.
The alias is exactly that. It is a variable that represent an actor. It is especially useful if the actor has a long name. The variable for the alias follows the as keyword.
There will be a use_case and an association in the following example. This is needed to show the importance of the alias. They will not be explained here. See their respective sections of this chapter for proper explanations.
Notice how much easier it is to create an association with the Ivy alias line 18. Otherwise you must write the entire name as shown for Zarek on line 15.
Example: Actor Alias
The stereotype field is defined by text between a double set of greater than and less than signs. This adds stereotype text above the actor icon. The stereotype text will be displayed in the color of the text_color property.
The fill_color is defined by a standard color name or hex code. It determines the interior color of the use_case icon. If you use this property at all it must come immediately after a hash (#) sign and touch the hash sign. If any other properties follow this place a semicolon (;) between them. No spaces are needed.
The line_color is defined by a standard color name or hex code. It determines the color of the line that defines the outer edge of the actor icon. This is the body, arms, legs, and outside of the head on a standard stick figure. If you use this property alone it must come after a hash (#) sign and touch the hash sign. If any other properties follow this place a semicolon (;) between them. No spaces are needed.
The line_type defines the texture of the exterior line of the actor. This is the body, arms, legs, and outside of the head on a standard stick figure. If you use this property alone it must come after a hash (#) sign and touch the hash sign. If any other properties follow this place a semicolon (;) between them. No spaces are needed.
The line_types are as follows.
line.bold
line.dashed
line.dotted
The text_color is defined by a standard color name or hex code. It determines the color of the name and the stereotype. If you use this property alone it must come after a hash (#) sign and touch the hash sign. If any other properties follow this place a semicolon (;) between them. No spaces are needed.
Note: If color formatting is used inside of the name property it will override text_color.
Note: If color formatting is used inside of the name property it will override text_color. See for example.