Run the sample

Prerequisites

Prior to run this sample, make sure that the security is enabled for your WebSphere Process Server. To enable security for the integrated test environment of your WebSphere Integration Developer, this Technote may help you to do so.

In addition, make sure that the active Authentication mechanism is LTPA.

To verify these two settings, open the administrative console (default URL is http://localhost:9060/admin) and then select Security > Global security. Note that changes to these settings are only effective until the next server restart.

1. Basic sample client application

Make sure that the client application is deployed on your WebSphere Process Server. If you need more details how to add an application to the server, refer to the "Build it Yourself" section of the Getting Started > Hello World sample.

Run the Basic sample

To run the client application after deploying it to the WebSphere Process Server, follow these steps:

  1. In a web browser, open URL http://yourhost:yourport/wsclient.
  2. Note: Replace yourhost with your server's internet address and yourport with the port of your server's HTTP transport, in many cases, the URL will look like this: http://localhost:9080/wsclient.

  3. If prompted, authenticate yourself to the server:
    • If you did not authenticate to your WebSphere Process Server during your current browser session, a login dialog similar to this appears:

    • If you already did authenticate to your WebSphere Process Server, e.g. by opening the admininstative console, the login dialog will be skipped.

  4. The entry page of your client application is displayed. Press the button List process templates:
  5. The result page of your client application is displayed.
    In case that you did not deploy and start any enterprise applications which contain a business process, the page will look like this:
  6. To see a list of process templates, you can deploy predefined applications containing business processes to your server.
    • For example, you can deploy the application HelloWorldApp which is available in the "Download" section of the Getting Started > Hello World sample.
    • Or, you can deploy the application bpcivt.ear (BPC Installation Verification Test) which is shipped in the "installableApps" subdirectory of your WebSphere Process Server which is located at runtimes/bi_v6/installableApps/bpcivt.ear of your WebSphere Integration Developer installation.

    When you install and start those two applications, the result page will contain the following entries:

2. Advanced sample client application

Important: Make sure that in addition to the client application, the application WSApiModuleApp containing the advertiseProcess is deployed and started on your server. This application is available in the download section of this sample; it simulates the scenario that for a given customer it is computed whether the customer is eligible to receive an advertisement gift.

Run the Advanced sample

To run the client application after deploying it to the WebSphere Process Server, follow these steps:

  1. In a web browser, open URL http://yourhost:yourport/wsclient/startprocess.html.
  2. Note: Replace yourhost with your server's internet address and yourport with the port of your server's HTTP transport, in many cases, the URL will look like this: http://localhost:9080/wsclient/startprocess.html.

    Instead, you can start as well from the Basic sample and follow the link Advanced sample.

  3. If prompted, authenticate yourself to the server:
    • If you did not authenticate to your WebSphere Process Server during your current browser session, a login dialog appears.
    • If you already did authenticate to your WebSphere Process Server, e.g. by opening the admininstative console, the login dialog will be skipped.

  4. The start page of the Advanced sample is displayed. Enter the fields with any values of your choice and press Submit data:
  5. An indication is given whether the business was started successfully.
    If the start did not succeed ("No response available") then double-check that the WSApiModuleApp is deployed and started successfully on your server, and then look for problems visible in the server logs.
    After a successful start of the process, the screen looks like this:
  6. Follow the first hyperlink on the screen; this link uses a parameterized URL similar to http://localhost:9080/wsclient/viewprocess.jsp?PIID=_PI:90030112.e8a7403c.a71c67f6.8e10337 which navigates to a status page for this particular process instance. For some seconds, the status will be STATE_RUNNING as the underlying BPEL process uses a sleep operation to delay the execution for some time (sleep time 10 seconds):
  7. Wait a moment. The status page will automatically trigger a refresh operation (refresh interval specified in this sample is 4 seconds) and after a few refresh operations, the screen will change to look similar to this: