7.3. Events, Signals, and MessagesThe smallest part of an interaction is an event. An event is any point in an interaction where something occurs, as shown on Figure 7-4. Figure 7-4. Probably the most common examples of events are when a message or signal is sent or receivedEvents are the building blocks for signals and messages. Signals and messages are really different names for the same concept: a signal is the terminology often used by system designers, while software designers often prefer messages. In terms of sequence diagrams, signals and messages act and look the same, so we'll stick to using the term "messages" in this book. An interaction in a sequence diagram occurs when one participant decides to send a message to another participant, as shown in Figure 7-5. Figure 7-5. Interactions on a sequence diagram are shown as messages between participantsMessages on a sequence diagram are specified using an arrow from the participant that wants to pass the message, the Message Caller, to the participant that is to receive the message, the Message Receiver. Messages can flow in whatever direction makes sense for the required interactionfrom left to right, right to left, or even back to the Message Caller itself. Think of a message as an event that is passed from a Message Caller to get the Message Receiver to do something. 7.3.1. Message SignaturesA message arrow comes with a description, or signature. The format for a message signature is: attribute = signal_or_message_name (arguments) : return_type You can specify any number of different arguments on a message, each separated using a comma. The format of an argument is: <name>:<class> The elements of the format that you use for a particular message will depend on the information known about a particular message at any given time, as explained in Table 7-2.
|