< Previous | Next >

Test the sample

After you have imported the required resources, you can use either the Business Process Choreographer (BPC) Explorer web client or the test client to run, test, and debug your application. BPC Explorer will be used in the following steps.

To run and test the vending machine, follow these steps:
  1. In the Servers view, right click WebSphere Process Server v7.0, and select Start. Wait until the server has fully started.
  2. Add the application to the server:
    1. In the Business Integration perspective, go to the Servers view.
    2. Right-click WebSphere® Process Server and select Add and remove projects from the list. The Add and Remove Projects window opens.
    3. In the navigation tree, click BSM_VendingMachine.
    4. Click Add and then click Finish. It will take several minutes for the server to start and publish the vending machine. Wait until Application started: ... is displayed in the Server Logs window.
  3. Launch the Business Process Choreographer Explorer as follows:
    1. In the Servers view, right-click WebSphere Process Server v7.0 and select Launch > Business Process Choreographer Explorer.
    2. In the login page, the default credentials are UserID: admin and password: admin.
    The Business Process Choreographer Explorer opens, and shows all tasks that are assigned to you. Currently there are no available tasks, so the No items found message is displayed.
  4. Invoke the application:
    1. To view a list of all process templates published to the server, click Process Templates in the Views tab navigation pane
    2. Select the VendingMachine template check box, and click Start Instance to start the vending machine process. The Start Instance button.
    3. In the Process Input Message page, enter P1 as the Process Name and 1111 as the id, and click Submit.

      The Process Input Message page.

    4. Click the VendingMachine template checkbox, and click Instances.

      The Instances button on the My Process Templates page.

    5. Click the P1 process instance name to go to the Process Instance Page.
    6. Click the Waiting Operations tab and you will see all of the operations listed as shown in this screen capture:

      The Process Instances page showing all of the operations listed.

    7. Click the on operation name to start the vending machine.
    8. Ensure that the id field is populated with 1111 and click Submit. If you take too long going through the deposit and the selection steps then the Vending Machine will return your deposit and go back to the Idle state.
    9. Click P1 process, select the Waiting Operations tab and click the deposit operation name.
    10. Enter 1111 as the coin id, and 1.0 as the coin value and click Submit. From the Console view, you can see that 1.0 is deposited
    11. Click P1 process, select the Waiting Operations tab and click the select operation name.
    12. Enter 1111 as the selection id and pop as the selection item. From the Console view, you can see that a pop is dispensed and $0.5 change is returned.
    13. To stop the vending machine, click the P1 process, select the Waiting Operations tab and click the off operation name and enter 1111 as the id.
  5. When you are done, log out of the explorer, remove the project, and stop the server.
< Previous | Next >





Feedback



This information center is powered by Eclipse technology. (http://www.eclipse.org)