The application makes heavy use of asynchronous business processes, one of which was demonstrated in the previous section, "Implementing an Asynchronous Business Process." No Business Process pattern implementations are first-class service implementations in the application. Instead, the Business Process pattern turns into a pure-Java implementation with the Asynchronous Business Process pattern fulfilling the role of the service implementation.
Table 9-1 shows the types of requirements that the asynchronous business process fulfills. In these requirements you see potentially long-running business process with clients being able to monitor the business process in multiple ways, through a Web Service (the programmatic access route) and through user interfaces.
ID | REQUIREMENT |
---|---|
U2 | The application shall allow customers to have access to current order status through a programmatic mechanism and through a user interface. |
F3 | The application shall provide programmatic access to submit orders, observe the fulfillment process, and pay invoices. |
Table 9-2 shows the primary code discussed in this chapter that you should browse in the downloaded source code. This source code undergoes a final evolution in Chapter 11, "Implementing the Observer Pattern," so you will see some slight modifications in the source code. For this chapter, you should look, primarily, at the structure of the ProductOrderManager class and the business process on which it relies. Also, examine the interaction between the business process, the business process manager, and the Order business object for the linkage between the business process and the process state.
FILE | LOCATION | DESCRIPTION |
---|---|---|
ProductOrderManager.java | src\com\servicefoundry\books\ webservices \processes | The product order business process discussed throughout the chapter. |
OrderCollectionImpl.java | src\com\servicefoundry\books\webservices\entities | The point object for order collections. Each order within the collection serves as the persistent location to obtain information about a particular product order's state. |
ProductOrderTest.java | src\com\servicefoundry\books\webservices\tests | A main program that runs the sample. |
Table 9-3 describes the targets to run for the Ant environment to see the programs and chapter samples in operation. Before running any samples, be sure you read and perform all of the install steps in the appendix.
TARGET | DESCRIPTION |
---|---|
testproductorder | Runs the product order sample business process |