556 Patterns: Building Serial and Parallel Processes for IBM WebSphere Process Server V6
8. Test this process again, this time specifying different input criteria.
a. Click the Invoke icon to create a new test case.
b. Specify a partNo of part2 and a quantity of 5.
c. Click Continue.
The component should this time respond with a daysToDeliver value of 10
and a quantity of 50 (Figure A-81).
Figure A-81 A second test of the Get Delivery Date functionality
9. Optionally, you can test the other components the same way. Right-click them
in the Assembly Editor and select Test Component. Remember to remove
the emulators before testing them.
Creating the service implementation for Wholesaler B
Now we implement Wholesaler B. The business logic for this wholesaler is as a
Web service. Wholesaler B implements the same three business functionalities
as Wholesaler A, but it implements them in Java, not as a WS-BPEL process or
business rule:
򐂰 Place Order (implemented as Java class)
򐂰 Get Delivery Days (implemented as Java class)
򐂰 Cancel Order (implemented as Java class)
Appendix A. Building Wholesaler A and B service implementations 557
Wholesaler B also implements the same interfaces as Wholesaler A:
򐂰 Get delivery days
򐂰 Place an order
򐂰 Cancel an order
We can reuse the interfaces from Wholesaler A shown in Table A-5.
Table A-5 Wholesaler B interfaces
Table A-6, Table A-7, and Table A-8 show the business objects that are used in
the interfaces listed in Table A-5. The interfaces and business objects are
identical to Wholesaler A.
Table A-6 Business objects of the get delivery interface WhDelReqWeb_I
Table A-7 Business objects of the place order interface WhPlaceOrdWeb_I
Get delivery days Place order Cancel order
Name WhDelReqWeb_I WhPlaceOrdWeb_I WhCnclOrdWeb_I
Operation getDeliveryDays placeOrder cancelOrder
Input getDeliveryDays
WholesalerRequest
placeOrderRequest cancelOrderRequest
Output getDeliveryDays
WholesalerResponse
PlaceOrderResponse cancelOrderResponse
Fault cannotFulfillOrder cannotFulfillOrder N/A
Name Business object
Input getDeliveryDaysWholesalerRequest WholesalerDeliveryDaysRequest
Output getDeliveryDaysWholesalerResponse WholesalerDeliveryDaysResponse
Fault cannotFulfillOrder WholesalerCannotFulfillOrder
Name Business object
Input placeOrderRequest WholesalerPlaceOrderRequest
Output PlaceOrderResponse WholesalerPlaceOrderResponse
Fault cannotFulfillOrder WholesalerCannotFulfillOrder

Get Patterns: Building Serial and Parallel Processes for IBM WebSphere Process Server V6 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.