01.01.2015 Views

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

218<br />

Sunday Morning<br />

receive pmt / issueConf()<br />

Order is filled /<br />

issueCustomerStmt()<br />

Filled<br />

Tentative<br />

Placed<br />

authorize override / issueConf()<br />

cancel /<br />

issueCustomerStmt()<br />

Cancelled<br />

Figure 21-1 Redundant actions entering and exiting the Placed state of the Order<br />

In Session 20, you discovered that the state icon could be expanded to reveal the internal<br />

transitions compartment. In that compartment you can model something called entry<br />

actions. Entry actions provide a means to eliminate the redundancy in Figure 21-1.<br />

Whenever you discover an action that must take place with every event that transitions<br />

to the same state, you can write the action(s) once as an entry action. Figure 21-2 shows<br />

the entry action notation, entry/action(s). When the redundant action is replaced by the<br />

entry action, you can remove it from the individual event arrows. This simplifies the diagram<br />

while preserving the same meaning. You would read the diagram to say, “Every time<br />

you enter this state issue an order confirmation.”<br />

receive pmt<br />

Tentative<br />

Placed<br />

entry/issueConf()<br />

Order is filled /<br />

issueCustomerStmt()<br />

Filled<br />

Figure 21-2<br />

authorize override<br />

Consolidating the entry actions<br />

cancel /<br />

issueCustomerStmt()<br />

Cancelled

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!