Run the sample

This sample can be run by using the Business Choreographer Explorer. Before you run this sample, please check the following:

  1. Security has to be enabled for WebSphere Process Server.
  2. The user registry of your local operating system has to contain particular groups and users. Refer to the Introduction section on how to create them.

Business Process Choreographer Explorer (BPC Explorer)

If you already know how to start a BPC Explorer session, you may proceed to the section Start the order process.

To start the BPC Explorer in the integrated test environment of your WebSphere Integration Developer, follow these steps:

  1. In WebSphere Integration Developer, switch to the Servers view.
  2. In the table, right-click WebSphere Process Server v6.2.
  3. From the pop-up menu, select Launch > Business Process Choreographer Explorer.

To start the BPC Explorer on WebSphere Process Server, follow these steps:

  1. In a web browser, open URL http://yourhost:yourport/bpc.
  2. Note: yourhost has to be replaced with your server's internet address, yourport has to be replaced with the port of your server's HTTP transport, for example http://localhost:9080/bpc.

If security is enabled, the BPC Explorer opens with a login screen:

  1. Enter a valid User ID and Password. The default User ID is admin.
  2. Click Login.

The BPC Explorer opens:

Start the Order process

To start the order process, follow these steps:

  1. Switch to the BPC Explorer.
  2. Log in with user ID sellerA. Be sure to enter the user ID in mixed case exactly as shown.
  3. In the Process Templates section, click Process Templates.
  4. The Process Templates view is displayed:

  5. Select orderProcess, then click Start Instance.
  6. The Process Input Message view opens:

  7. Optionally, enter a Process Name.
  8. In the CustomerName Field, enter a value of type string.
  9. In the ItemNo field, enter an integer value.
  10. In the Prize field, enter a float value.
  11. Click Submit.

After some elapsed time, you will find output similar to the output below in the log file.

[1/12/09 17:37:05:932 CET] 0000037b SystemOut   O Order from Franz Mustermann received
[1/12/09 17:37:05:932 CET] 0000037b SystemOut   O ItemNo 12345 for the prize of 9.99 Euros received

Try to start the Delete Customer process with insufficient privileges

In this section we try an operation (e.g. start a sensitive process) without being authorized to do that operation. Note that user sellerA is not allowed to delete a customer since user sellerA is not a member of the group approvers, which is specified as the set of potential starters for this process.

To start the customer deletion process without being authorized, follow these steps:

  1. Switch to the BPC Explorer.
  2. Make sure you are still logged in with user ID sellerA (case sensitive).
    Hint: You can see the currently logged in user ID in the upper left corner next to "Welcome".
  3. In the Process Templates section, click Process Templates.
  4. The Process Templates view is displayed:

  5. Select deleteCustomerProcess, then click Start Instance.
  6. An exception message is displayed.

    In addition, this error message is added to the log file.

Start the Customer Deletion process with sufficient privileges

To start the customer deletion process, follow these steps:

  1. Switch to the BPC Explorer.
  2. Log out the previous user (sellerA) and log in with user ID approverA. Be sure to enter the user ID in mixed case exactly as shown.
  3. In the Process Templates Section, click Process Templates.
  4. The Process Templates view is displayed:

  5. Select deleteCustomerProcess, then click Start Instance.
  6. The Process Input Message View opens:

  7. Optionally, enter a Process Name.
  8. In the CustomerName Field, enter a value of type string.
  9. Click Submit.

After some elapsed time, you will find output similar to the output below in the log file.

[1/12/09 17:57:39:604 CET] 0000037b SystemOut   O The Customer Franz Mustermann was permanently deleted

Try to do administrative operations on the Delete Customer process with insufficient privileges

In this section we try to perform administrative operations on a process instance (e.g. terminate or delete) without being authorized to do so.

Note that for this process template, user approverA has more privileges than sellerA but still is not allowed to do certain restricted administrative operations, since approverA is not a member of the group supervisors, which is specified as the set of administrators for this process template.

To see the list of administrators for this process, follow these steps:

  1. Switch to the BPC Explorer.
  2. Make sure you are still logged in with user ID approverA (case sensitive).
    Hint: You can see the currently logged in user ID in the upper left corner next to "Welcome".
  3. In the Process Instances section, click Started By Me.
  4. The view Process Instances Started By Me is displayed:

  5. Click on the process instance of the template deleteCustomerProcess to see the details for this process instance.
  6. The Process Instance view opens. Note that you are logged in as approverA [* 1 *], but the list of administrators [*2*] does not contain that userid:

  7. Try some administrative operations; for example, if the process instance is in state Running, administrators may want to issue Terminate [*3*], and if the process instance is in state Terminated or Finished, administrators may want to issue Delete [*4*].
  8. Since you are not logged in as an administrator, an exception message like this is displayed:

    In addition, in the log file you will find output similar to the output below:

    [1/12/09 18:11:24:713 CET] 000002a5 BpelEngine   I  CWWBE0133E: The user 'approverA' is not allowed to perform the requested action 'delete()' on process 'deleteCustomerProcess'.

 

Do administrative operations on the Delete Customer process with appropriate privileges

In this section we repeat the administrative operations, now with sufficient privileges. For this, we log in as supervisorA, who is a member of the group supervisors, which is specified as the set of administrators for this process.

Follow these steps:

  1. Switch to the BPC Explorer.
  2. Log out the previous user (approverA) and log in with user ID supervisorA. Be sure to enter the user ID in mixed case exactly as shown.
  3. In the Process Instances Section, click Administered By Me.
  4. The view Process Instances Administered By Me is displayed where you should find the process instance either in Running or in Finished state:

  5. Check the checkbox next to the process instance name.
  6. If the process instance is in state Running, wait for some time and then press Refresh. Repeat this step until the process instance is in state Finished. Alternatively, you may try the Terminate operation instead of waiting.
  7. Use the Delete operation.
  8. Press Refresh and verify that this process instance has disappeared.