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
Note: You can find more detailed information about each of these
artifacts in the Getting Started sample.
- Create a business module as follows:
- Right-click an empty area of the Business Integration
view, and choose 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 choose from the list. The New Business
Object window launches.
- Refer to the table below, and enter the value from the Business
object name column, into the Name field
and click Finish. Repeat for the
other business object.
- In the Business object editor, right-click the new business
object, and select Add field.
- Assign values for the attribute and type fields
as shown in the following table. Type over "field 1" to add the attribute.
Accept "string" or press the Tab key and select
a type from the list.
Business object 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. Each operation
represents the action that will cause the transition from one state
to another.
- 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 |
Operation type |
Input |
Input type |
Output |
Output type |
on |
one way |
id |
string |
- |
- |
deposit |
Request Response |
coin |
Coin |
accepted |
boolean |
select |
Request Response |
selection |
Selection |
processed |
boolean |
cancel |
one way |
id |
string |
|
|
off |
one way |
id |
string |
- |
- |
- Save your work.
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.