Showing Transitions as Icons


Sometimes you want to emphasize the transitions of your state diagrams instead of the states. UML provides you with a notation that gives you a transition-oriented view of state diagrams. Instead of showing an event in text, you can use special icons. Each part of the event text has its own icon:

  • Signal receipt: The name of the incoming event and its attributes is known as the signal received by your object. A signal-receipt icon looks like a small flag with the name of the event and its attributes inside. Some people describe the signal-receipt icon as a rectangle with a triangular notch in its side (either side will do).

  • Signal sending: If your object must send an event off to another instance as a result of receiving the incoming event, then show the sending of the event with a signal-sending icon. This icon looks like a boxy arrow with the signal-sending event information shown inside the box. Others might describe it as a rectangle with a triangular point coming out of one side (again, either side will do).

  • Action sequence: The action part of the incoming event is shown with an action-sequence icon (a box with the action text shown inside).

An example of this transition-oriented notation is shown in Figure 17-9. Instances of the CustomerAccount class have the following event that causes a transition from the OnTrial to the Cancel state:


Figure 17-9: An example of UML's transition-oriented notation.

 nonpayment(Invoice) [Invoice.date < Today - 30 days] /
customer.overDue(Invoice); display("Late Payment")

Use a choice-pseudostate icon to handle the guard condition [Invoice.date < Today - 30 days]. The choice-pseudostate icon is shown as a large diamond with the decisions shown in square brackets. The decisions are tested and the object makes the transition to the next icon, depending on which decision is true. (You can find more about this and other pseudostates in the Chapter 18.)




UML 2 for Dummies
UML 2 For Dummies
ISBN: 0764526146
EAN: 2147483647
Year: 2006
Pages: 193

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net