Run the sample

Prerequisites

Before you run this sample, make sure that the following prerequisites are met:

  • You have completed the chapter Build it yourself of this sample.
  • You were able to build the application without errors.
  • Your WebSphere Process Server is up and running.
  • Security is enabled for your WebSphere Process Server.

1. Basic sample client application

Run the Basic sample

Follow these steps:

  1. In Microsoft Visual Studio, select Debug > Start Debugging or click the green arrow .
  2. If needed, the application is automatically built. Then, the simple application window pops up.

  3. In the first text field, enter a valid userid. In the second text field, enter the valid password for this userid. Click the List Process Templates push button.
  4. In case that you did not deploy and start any enterprise applications which contain a business process, the page will look like this:

  5. 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 from the "Download" chapter of the Getting Started > Hello World sample.
    • As well, you can deploy the application WSApiModuleApp.ear which is available from the Download chapter of this sample.

    After installing and starting those two applications, the result page will contain the following entries:
  6. Now run the application again, but leave the password field empty.
  7. After clicking the List Process Templates button, the client will show an error message. However this error is generated by the client while it tries to create a Username token from the user's input. The server is not contacted during this test.

  8. Finally, do a test to challenge the server's security mechanism. For this, enter a wrong password and click the List Process Templates button.
  9. Now the client appends another error message to the output which reports that on the server the user validation failed:


    Note: If you want to retry this test several times, you may want to use an invalid userid (rather than a valid userid and an invalid password), to avoid that the Operating System locks out the user account due to excessive number of failed login attempts.

2. Advanced sample client application

Important: Make sure that you have followed the steps in the chapter Advanced Version. In addition, the application WSApiModuleApp available from the must be deployed and started on your server. This application simulates the scenario that for a given customer it is computed whether the customer is eligible to receive an advertisement gift.

Run the Advanced version

Follow these steps:

  1. In Microsoft Visual Studio, select Debug > Start Debugging or click the green arrow .
  2. If needed, the application is automatically built. Then, the start window pops up which contains the push button Advanced Sample we created in the chapter "Advanced Version".

  3. In the first text field, enter a valid userid. In the second text field, enter the valid password for this userid. Click the Advanced Sample push button.
  4. A new dialog window pops up. Enter any values of your choice and press Submit data.
  5. A window for inspecting the process state opens. Click Refresh.
  6. Because the business process is designed to sleep for 10 seconds, the process might be in running state.
    Click Refresh again to update the window content.
  7. Eventually, the window will display that the process has finished, together with the boolean output result.
  8. Note: Process instances of template advertiseProcess are not deleted automatically on termination, you have to remove these instances manually.