Chapter 4
Generally, the life of an object follows such a predetermined course, meaning that the
object has to follow certain rules. Thus, the behavioral view is especially important,
because it is the job of the IT system to ensure that these rules are followed. It is
important that rules are documented in a correct and complete manner, to avoid
misunderstandings on both the user side and the developer side. In a completed IT
system, it should not be possible for a user to delete or modify objects when it is not
permitted by business rules.
In the Hanseatic Merchant's trading office, an object corresponds to a book, for instance,
the order book, and the clerk who is responsible for that book. The statechart diagram of
the object contains the rules that the clerk has to follow when he handles the book. It is
his instruction manual. It states, for example, that an order that has already been
delivered, but that is not yet paid for, cannot be canceled. If you could sit next to the clerk
for a while and watch him do his work, you would be able to see everything that can
happen with an order in the order book. It can, for example, be recorded, modified,
delivered, canceled, or paid for. The statechart diagram of the behavioral view contains
the result of this object observation.
4.3.2. The Elements of the View
Figure 4.46 Behavioral view
The behavioral view, illustrated in Figure 4.46, consists of many statechart diagrams,
each of which shows the behavior of an individual object. Therefore, all the statechart
diagrams combined show the behavior of all the objects of the IT system. However, in
practice, most often not all statechart diagrams are constructed but only those that:
Contain many or important business rules or
Describe important objects
151

Get UML 2.0 in Action A Project-Based Tutorial now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.