BPEL4WS by Example

So, now that we know some of the details behind BPEL4WS, perhaps it's best to walk through an example to bring the concepts home. Let's return to our broker example.

When receiving an order from a client, the broker example creates three process instances that are required to carry out the order (see Figure 13.2):

  1. Booking the order into the order management system

  2. Executing the trade

  3. Deducting the amount of the trade from the client's cash account

Figure 13.2. A graphical representation of our example BPEL4WS process to book the purchase of a stock.

graphics/13fig02.gif

In the world of process integration, as you may remember from the previous chapter, some processes can proceed in parallel; there are control and data dependencies that exist between the tasks running in parallel. For example, you can't execute a trade before booking the order, and then and only then can you deduct the amount of trade from the client's cash account.

The WSDL portType offered by the service to its clients (bookOrderPT), and other WSDL definitions required by the business process, are included in the same WSDL document. For example, the portTypes for the Web services serving up trade calculations, execution information, and accounting services are defined there, as well. BPEL4WS creates a process defined as an abstract process by referencing the portTypes of the services involved in the process. This facilitates reuse of the process definitions through multiple deployments of the processes.

Moving further through our example, the service link types represent the interaction between the trading system and each of the parties with which it interacts. Remember, we can use a service link type to represent dependences between services, and each service link type defines up to two "role" names and lists the portTypes that each role supports for the process. For our scenario, two link types BookOrderLT and ExecTradeLT list a singe role because, in the corresponding service interactions, one of the parties provides all the invoked operations. In this case, the BookOrderLT service link abstracts the connections between the process and the requesting client, where the order booking service offers a service operation BookOrder. What's more, the ExecTradeLT service link represents the communication between the booking order service and the execute trade service.



Next Generation Application Integration(c) From Simple Information to Web Services
Next Generation Application Integration: From Simple Information to Web Services
ISBN: 0201844567
EAN: 2147483647
Year: 2005
Pages: 220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net