Before you can begin to assemble your state machine in the graphical
editor, you will have to create the artifacts that will support the state
machine.
In this step, you will create the following artifacts:
- a business module
- two business objects
- an interface
- five operations
- Create a business module as follows:
- Right-click an empty area of the Business Integration view,
and chose from the list.
- In the New Module window, name the module BSM_VendingMachine,
accept the defaults and click Finish.
- Create two business objects as described below, and assign them
the values listed in the table.
- Right-click your newly created module, and chose from
the list. The New Business Object window
launches.
- In the Name field, refer to the table
below, and enter the next logical value in the Name column,
and click Finish.
- In the Business object editor, right-click the new business
object, and select Add an attribute.
- Assign values for the attribute and type fields
as shown in this table:
Name |
Attribute |
Type |
Coin |
id |
string |
|
value |
double |
Selection |
id |
string |
|
item |
string |
- Create an interface as follows:
- Right-click your module, and chose from the list. The New
Interface Wizard window launches.
- Name the interface VendingMachineInterface and
click Finish.
- Create five operations for this interface as follows:
- Refer to the first column in the table directly below, and determine
the type of operation that you are creating. Then, right-click the Interface
editor and select either Add One Way Operation or Add
Request Response operation.
- Configure the new operation according to the fields in this
table.
Operation type |
Operation name |
Input name |
Input type |
Output name |
Output type |
one way |
on |
id |
string |
- |
- |
Request Response |
deposit |
coin |
Coin |
accepted |
boolean |
Request Response |
select |
selection |
Selection |
processed |
boolean |
one way |
cancel |
id |
string |
|
|
one way |
off |
id |
string |
- |
- |
Now that you have completed the creation of the necessary artifacts,
you may create your state machine, and then begin to assemble the necessary
components.