8.1 Action States

As discussed in Chapter 2, as elements communicate with one another within a society of objects, each element has the responsibility of appropriately reacting to the communications it receives. An action state represents processing as an element fulfills a responsibility. There are various types of action states, including simple, initial, and final action states. The next few sections discuss these different types of action states.

8.1.1 Simple Action States

A simple action state represents processing. For example, the project management system may have the following simple action states:

Project Manager Enters Report Criteria

Indicates that the project manager enters report criteria

Project Management System Generates Report

Indicates that the project management system generates a report

Printer Prints Report

Indicates that the printer prints the report

In the UML, an action state is shown as a shape with a straight top and bottom and convex arcs on the two sides, and is labeled with the name of an operation or a description of the processing. Figure 8-1 shows the various action states associated with the project management system.

Figure 8-1. Simple action states

8.1.2 Initial and Final Action States

An initial action state indicates the first action state on an activity diagram. In the UML, an initial action state is shown using a small solid filled circle. A final action state indicates the last action state on an activity diagram. In the UML, a final action state is shown using a circle surrounding a small solid filled circle (a bull's eye). Figure 8-2 updates Figure 8-1 with an initial and final action state. An activity diagram may have only one initial action state, but may have any number of final action states.

Figure 8-2. Simple, initial, and final action states