Run the sample

Client application

To run this sample, use the Business Process Choreographer Explorer.

Business Process Choreographer Explorer (BPC Explorer)

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

  1. In WebSphere Integration Developer, switch to the Servers view.
  2. In the table, right-click WebSphere Process Server v6.1.
  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 sample business process

To start the order process, follow these steps:

  1. Switch to the BPC Explorer.
  2. In the Process Templates section, click My Process Templates.
  3. The My Process Templates view is displayed:

  4. Select OrderProcess, then click Start Instance.
  5. The Select operation view opens:

  6. Click enterPersonalData.
  7. The Process Input Message view opens:

  8. Optionally, enter a Process Name.
  9. In the orderNo field, enter a value of type string. This value is required again later, when you send product data to the business process.
  10. In the familyName field, enter a value of type string.
  11. In the firstName field, enter a value of type string.
  12. In the birthday field, enter a value of type string.
  13. Click Submit.

If you enter the values that are listed in the following table, the process generates the described results:

No Field Value SystemOut.log statement Remarks
1 orderNo EMPTY STRING CWWBA0135E: Unable to execute the query expression '/personalData/orderNo' Process terminates with a correlation error.
2 familyName EMPTY STRING Customer check failed. CustomerVerificationService returns FALSE.
3 firstName EMPTY STRING Customer check failed. CustomerVerificationService returns FALSE.
4 birthday EMPTY STRING Customer check failed. CustomerVerificationService returns FALSE.

Send events to the sample business process

To send events to the order process, follow these steps:

  1. In the BPC Explorer, switch to the Process Templates view.
  2. Select OrderProcess, then click Instances.
  3. The Process Instances for Process Templates view is displayed:

  4. Click the process instance name order process 1.
  5. The Process Instance view is displayed:

  6. Click the waiting operations tab.
  7. A list with all messages that can be sent to the process is displayed:

  8. Click enterProductData.
  9. The Send message view is displayed:

  10. In the orderNo field, enter a value of type string. Use the same value you have entered for orderNo in the personal data message.
  11. In the kind field, enter a value of type string.
  12. Leave the size field blank. The process calculates this value based on the number.
  13. In the number field, enter a numeric value.
  14. In the street field, enter a value of type string.
  15. In the zipcode field, enter a value of type string.
  16. In the city field, enter a value of type string.
  17. Click Submit.

If you enter the values that are listed in the following table, the process generates the described results:

No Field Value SystemOut.log statement Remarks
1 kind "Pizza Funghi" checkAvailability(DataObject) - EXIT. false StockManagerService returns FALSE.
2 number 0 checkAvailability(DataObject) - EXIT. false StockManagerService returns FALSE.
3 number < 0 checkAvailability(DataObject) - EXIT. false StockManagerService returns FALSE.
4 kind "mercedes" - The price per unit is set to 35000.
5 kind "porsche" - The price per unit is set to 55000.

Process output

The order process implements two one-way operations, so no output message is available. See the next chapter on how to inspect the SystemOut.log file.

SystemOut.log file

Inspect the SystemOut.log of your WebSphere Process Server. The order process prints statements similar to the following ones to the SystemOut.log:

[25.10.05 13:46:19:787 CEST] 0000008c SystemOut O CustomerVerificationService.checkCustomer(DataObject) - ENTRY.
[25.10.05 13:46:19:787 CEST] 0000008c SystemOut O personalData != null
[25.10.05 13:46:19:787 CEST] 0000008c SystemOut O input values != null and not empty
[25.10.05 13:46:19:787 CEST] 0000008c SystemOut O CustomerVerificationService.checkCustomer(DataObject) - Exit.true 1130240779787 Cardissimo

[25.10.05 14:28:14:604 CEST] 00000126 SystemOut O checkAvailability(DataObject) - ENTRY.
[25.10.05 14:28:14:604 CEST] 00000126 SystemOut O productData != null
[25.10.05 14:28:14:604 CEST] 00000126 SystemOut O requested number of kind Porsche: 1
[25.10.05 14:28:14:604 CEST] 00000126 SystemOut O checkAvailability(DataObject) - EXIT. true

[25.10.05 14:28:14:974 CEST] 0000008b SystemOut O PreparePriceRequest. EXIT

[25.10.05 14:28:18:780 CEST] 0000008b SystemOut O CalculateTotalAmount: 55002.0

[25.10.05 14:28:23:416 CEST] 00000090 SystemOut O Order no.: op1.Charging response: ok.Shipping acknowledgement: Shipment acknowledged. Reference No.: op1, price: 2.0..Shipping report: Shipment report. Reference No.: op1. Package to: Andreas Fried, 12345, NiceTown, MyStreet was delivered successfully..

In error cases, the order process prints statements similar to the following ones to the SystemOut.log:

[25.10.05 13:15:48:484 CEST] 0000008c SystemOut O CustomerVerificationService.checkCustomer(DataObject) - ENTRY.
[25.10.05 13:15:48:494 CEST] 0000008c SystemOut O personalData != null
[25.10.05 13:15:48:494 CEST] 0000008c SystemOut O CustomerVerificationService.checkCustomer(DataObject) - Exit.false

[25.10.05 14:23:37:455 CEST] 00000126 SystemOut O checkAvailability(DataObject) - ENTRY.
[25.10.05 14:23:37:455 CEST] 00000126 SystemOut O productData != null
[25.10.05 14:23:37:455 CEST] 00000126 SystemOut O requested number of kind Pizza Funghi: 2
[25.10.05 14:23:37:455 CEST] 00000126 SystemOut O checkAvailability(DataObject) - EXIT. false

[25.10.05 14:23:37:685 CEST] 00000126 SystemOut O Order no.: 222.Availability check failed.

The charging process prints a statement similar to the following to the SystemOut.log:

[25.10.05 14:28:22:635 CEST] 0000012d SystemOut O Charging 27.0 from Customer Fried. CardNumber: 1130243255327

During processing, the order process invokes the shipping process, which does not print statements to the SystemOut.log file. See the next chapter on how to display the input and output messages of the shipping process using the BPC Explorer.

Input and output messages

To display the process' input and output messages, follow these steps:

  1. In the BPC Explorer, switch to the My Process Templates view.
  2. Select ShippingProcess, then click Instances.
  3. The process instance list is displayed:

  4. Click the process instance name.
  5. The Process Instance view is displayed:

  6. Click the Process Input Message tab.
  7. The process input message is displayed:

  8. Click the Process Output Message tab.
  9. The process output message is displayed:

Clean up process instances

Instances of the shipping process are not cleaned up automatically after an instance has finished. To delete process instances, follow these steps:

  1. In the BPC Explorer, switch to the My Process Templates view.
  2. Select ShippingProcess, then click Instances.
  3. The Process Instances for Process Templates view is displayed:

  4. Select all process instances with a state of Finished or Failed.
  5. Click Delete.