Add actions to the Provisional state definition and specify the trigger event of a transition.
To add actions to a state definition
1 Open the definition of the state Provisional.
2 Select the Actions tab, type in the action Create, and press your Enter key. By default, it is When property is set to On entry. Leave the default.
3 Click in the Create cell, and then click Define.
4 Select the Methods tab. Click Choices, and then drag into the list the method create(long, long, char, char)."Reservation System" .Reservation. Click OK to close the dialog.
5 In the Actions grid, type in an action named Compute Total Price, and press Enter. By default, it is When property is set to On entry. Click in this field and change the default by selecting Do.
6 Click in the Compute Total Price cell, and then click Define.
7 Select the Methods tab. Click Choices, and then drag into the list the method CalculatePrice(long)."Reservation System".Reservation. Click OK to close all dialogs.
Specify the Trigger Event of a Transition
1 Open the definition of the transition Credit OK. In the Trigger Event field, type the name of the event that triggers this transition– Update Status to Reserved.
2 Select File > Save Diagram.
In a your project, you would continue specifying the actions and events for this state diagram to gain a better understanding of the Reservation's behavior. For this tutorial, you will move on to another facet of modeling. Please review the state diagram section of the help for detailed information on advanced state modeling, including super- and sub-states, history, concurrency, and so on.