Page 223 -
P. 223
208 PASTOR, MOLINA, AND IBORRA
Figure 11.3 Class “Client” Is Agent of Services “Rent” and “Return” of Class “Vehicle”
Client Vehicle
«Id» ClientId: Autonomous «Id» PlateNumber: String
CreationDate: Date CreationDate: Date
GivenName: String Make: String
FamilyName: String Model: String
Address: String Fuel: String
RentalCount: Nat Kilometers: Real
RentalBalance: Real «agent» Status: String
PendingBalance: Real Notes: String
«new» NewClient() «new» Create()
«destroy» DeleteClient() «destroy» Delete()
Edit() Rent()
Rent() Return()
Return()
Dynamic Model
Once the static architecture of the system has been defined, we can define the dynamic aspects
(associated to intraobject control and interobject communication). This is done through the dy-
namic model, which includes a state transition diagram per class, triggers, and a global transac-
tions specification.
There is a state transition diagram per class present in the objects model. A UML state machine
diagram is used to specify the valid lives of objects of a class, that is, the order in which services
of the class can occur throughout the life of its objects.
To specify class triggers and global transactions, UML communication diagrams are used. Trig-
gers represent those class services to be activated when a predefined condition holds in the source
class. Global transactions allow global services to be defined, with global meaning that they group
different services declared in different classes, making them constitute a single execution unit.
Functional Model
Once the system class structure has been specified and system dynamics in the form of valid lives
of class objects and interobject communication mechanisms are properly defined, the only aspect to
be considered is how a class service occurrence will change the local state of the involved objects.
This is done through the functional model in which dynamic logic axioms of the form
f [s()] f´
are defined to specify events functionality, where f and f´ are well-formed formulae built over an
alphabet of class attributes and s is the corresponding service whose functionality is being speci-
fied. The informal meaning of such formulae is that “assuming that f is true, f´ will express the
new resulting object state after the occurrence of s.” These dynamic logic axioms are the result
of applying a pre/post-specification technique.