O'Reilly logo

Learning UML by Sinan Si Alhir

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Transitions

Given the states of an element, how are they related to one another? Transitions address this question. As discussed in Chapter 2, transitions between states occur as follows:

  1. An element is in a source state.

  2. An event occurs.

  3. An action is performed.

  4. The element enters a target state.

When an event occurs, the transition is said to fire. In the UML, a transition is shown as a solid line from a source state to a target state labeled with the event followed by a forward slash followed by the action, where the event and action are optional and the forward slash is used only if an action is shown. The next few sections discuss events and actions.

Tip

A transition without an event and action is known as an automatic transition. Such transitions are discussed in the next chapter.

Events

An event is an occurrence, including the reception of a request. For example, the project management system may respond to the following events:

Startup

Indicates that the project management system will become active if it is inactive.

Shutdown

Indicates that the project management system will become inactive if it is active.

Severe Error

Indicates that the project management system has encountered a severe error, perhaps because it is running low on secondary storage, and will become suspended if it is active.

Reset

Indicates that the project management system will become active if it is suspended.

In the UML, an event is described using the following UML syntax:

                  event_name (parameter_list) [ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required