< Previous | Next >

Creating the state machine

With the necessary artifacts in place, you can now create the state machine, and configure it appropriately.

In this step, you will do the following:
  1. Create a new state machine as follows:
    1. Right-click the BSM_VendingMachine module and chose New > Business State Machine from the list.
    2. In the New Business State Machine wizard, name the state machine VendingMachine and click Next.
    3. On the Select an Interface page, choose VendingMachineInterface from the Interface drop down list, select the on operation, and click Finish. The Select an Interface wizard showing the proper selections.
    A new state machine is created, and appears in the editor as shown in this image:
    The state machine as it first appears
  2. Create a variable:
    1. Click the plus icon (The plus symbol) in the Variables category.
    2. In the Add Variable dialog, name the new variable to total.
    3. Select double as the type, and click OK.
  3. Specify a correlation:
    1. Click the plus icon (The plus symbol) in the Correlation Properties category.
    2. In the Add Correlation Property dialog, change the name to id.
    3. Select string and click OK.
    4. Specify property aliases as shown in this table:
      Operation Alias
      on /id
      deposit /coin/id
      select /selection/id
      cancel /id
      off /id
A new state machine is created, and appears in the state machine editor.

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.
< Previous | Next >