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.

SESSION<br />

21<br />

Applying the Basic<br />

Statechart to the Case Study<br />

Session Checklist<br />

✔ Explaining entry and exit actions<br />

✔ Explaining send events<br />

✔ Explaining the order of event execution<br />

✔ Applying the basic Statechart notation to the case study<br />

The Statechart diagram can become very busy. The <strong>UML</strong> offers two simplifications called<br />

entry and exit actions, along with the ability to send work to other objects. In this session<br />

I show you how to take advantage of these features to simplify your diagram for<br />

the Order object. I also show you how to construct the complete Statechart diagram for the<br />

Order object using the problem statement.<br />

Defining Entry and Exit Actions<br />

Modeling state transitions often results in more than one event that changes the object to<br />

the same state. Each of those events may have a corresponding action. For example, in<br />

Figure 21-1 the Statechart for the Order object says that you can transition the Order from<br />

Tentative to Placed by either receiving the payment for the order or getting an override<br />

authorization. But both events require the same action: issue an order confirmation<br />

(issueConf()).

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

Saved successfully!

Ooh no, something went wrong!