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 21—Applying the Basic Statechart to the Case Study 225<br />

Likewise, the Statechart allows many events to transition out of the same state. Each event<br />

may trigger an action. When all the actions associated with the transitions out of a state<br />

are the same, you can model them as a single exit action. Place the exit action description<br />

in the internal transition compartment of the state.<br />

When an action is directed at an object other than one modeled by the Statechart<br />

diagram, use the dot notation to qualify the action. Place the object name and a<br />

period in front of the action expression.<br />

When an event takes place it sets off a series of responses in the form of actions and<br />

activities. The order of execution for the actions and activities is:<br />

1. If an activity is in progress in the current state, interrupt it.<br />

2. Execute the exit: action(s).<br />

3. Execute the actions associated with the event that started it all.<br />

4. Execute the entry: action(s) of the new state.<br />

5. Execute the activity or activities.<br />

QUIZ YOURSELF<br />

1. What is an entry action (See “Defining Entry and Exit Actions.”)<br />

2. What is an exit action (See “Defining Entry and Exit Actions.”)<br />

3. How do you indicate that an action should be performed on another object<br />

(See “Defining Send Events.”)<br />

4. What is the first thing that happens when an event takes place (See “Order of<br />

Events.”)<br />

5. When an event takes place, which happens first, the exit actions or the actions<br />

associated with the triggering event (See “Order of Events.”)

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

Saved successfully!

Ooh no, something went wrong!