Work with state shapes in UML statechart and activity diagrams
Add an internal action or activity to a state in a statechart or activity diagram
-
In a statechart diagram or activity diagram, double-click the State shape you want to add the internal action or activity to.
-
In the UML State Properties dialog box, click Internal Transitions.
-
Type a name for the transition.
-
Click Properties. Choose the event you want. To create a new event, click Events, click New, choose the kind of event you want, and then click OK.
-
Type a name for the event and type or choose the other property values you want. Click a tab to add constraints, tagged values, or parameters, depending on the type of event you're creating. Click OK until you return to the Transition tab (UML Transition Properties dialog box).
-
Select Guard to add a guard condition, and then in the text box, type the guard condition you want.
-
Under Language, choose the language you want.
-
Click the Actions tab, and then click New to create an action expression. Choose the kind of action you want. Click OK, and then click Properties.
-
Type a name for the action and type or choose the other property values you want. Click a tab to add details, arguments, constraints, or tagged values. Click OK until you return to the Internal Transitions tab, and then click OK again.
By default, internal actions are hidden on a State shape. To show the internal actions, right-click the shape, and then click Shape Display Options. Under Suppress, clear the Transition check box.
Add entry and exit actions to a state in a statechart or activity diagram
-
On a statechart diagram or activity diagram, double-click the State shape you want to add an entry or exit action to.
-
In the UML State Properties dialog box, click Entry or Exit, and then click New.
-
Choose the action type you want, and then click OK. Type a name for the action.
-
Click Properties to add details, arguments, constraints or tagged values. Click OK until you close the UML State Properties dialog box.
By default, entry and exit actions are hidden on a State shape. To show the actions, right-click the shape, click Shape Display Options, and then clear Transition.
Defer events on an action state in an activity diagram
-
In the tree view or in an activity diagram, double-click the icon or shape representing an action state.
-
Click Deferred Events.
The events available in the package to which the action state belongs are listed. Select the events you want to be deferred by the state.
No comments:
Post a Comment