|
SYS-CON.TV Webcasts
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Top Links You Must Click On
Feature How to Deliver Composite Applications with Java, WS-BPEL & SOA
Supporting the complete lifecycle
Apr. 9, 2007 09:30 AM
The Applicant Evaluator service will be implemented as a stateless session bean annotated to be exposed as a Web service. This service will invoke an external Web service to get a credit report and also invoke another stateless session bean - Performance Evaluator - to get an internal credit report, if one is available. The Vehicle Information Server and Financial Index Server Stateless Session Bean functions will be exposed as Web services. The Loan Approval Processor service will be implemented as a stateless session bean and annotated to be exposed as a Web service. The Vehicle Loan Application Process will be implemented as a business process that invokes the Applicant Evaluator, Vehicle Information Server, Financial Index Server, and Loan Approval Processor services in that order (see Figure 3).
Implementation NetBeans Enterprise Pack 5.5 provides the necessary capability to perform all the above tasks from within the IDE without the need to use any other tool or editor.
The Java Services In the second phase, two new services are created. The Applicant Evaluator service is a stateless session bean also exposed as a Web service. This service aggregates results from an external Web service, FICOSimulator, and the Performance Evaluator stateless session bean. The FICOSimulator Web service simulates an external Web service that returns a credit report (see Figure 4). The Loan Approval Processor is another service developed as a stateless session bean, also exposed as a Web service. This service combines reports on the applicant's credit worthiness, the vehicle's value, the loan indicators, and returns a decision based on predefined business rules.
Composing the Services A BPEL Project, CreditApplicationProcessorBusinessProcessor, is created and the WSDLs and XSDs for the following services are included: 1) Applicant Evaluator, 2) Vehicle Information Server, 3) Financial Index Server, and 4) Loan Approval Processor Service. Once the WSDLs are imported, Partner Link Types are created for the Port Type that will be invoked from the business process. Please note that the credit application process is going to be exposed as a Web service, so, another WSDL is created, CreditProcessor.wsdl, that represents the interface to the business process. Partner Link Types specify the role that will be played by the service defined in the Port Type. For example, the Partner Link Type CustomerDataServicesPartners below specifies that the service will play the role of a CustomerReportProvider when the function getCustomerReport is invoked.
<partnerLinkType name="CustomerDataServicesPartner"> Once Partner Links Types are created in the WSDLs for the PortTypes, they can now be invoked from a business process. The user can simply drag and drop the WSDL on the Business Process Editor canvas and the Business Process Editor automatically recognizes the available Partner Link Types and shows a wizard for configuring the Partner Links for the business process. The wizard allows the user to determine if the business process will be a consuming partner or a providing partner of the service defined in the Partner Link Type. The WS-BPEL 2.0 specification provides various types of activities for modeling complex and real-world business processes. The business process can receive and reply to messages or it can just receive messages without responding. Business processes can also receive messages asynchronously from external sources. The key constructs supported in the WS-BPEL specification include the ability to invoke external services, handle exceptions, process compensation, and error condition logic. It also allows for modeling the concurrent and conditional execution of activities. The sample used in this article uses only a few of the constructs, namely, Receive, Reply, Invoke, and Assign activities. The Invoke activity is used to consume the services and the Assign activity is used to set and get values to the input and from the output messages of the invoked service. The Assign activity opens up a mapper that allows users to view all the variables in the business process and graphically get and set values between them. The mapper also provides data processing and transformation functions that can be used in conjunction with the assignments. The Receive activity is used to receive an incoming message that creates an instance of the business process at runtime. The reply activity is used to send a response message back to the caller and the business process instance is then discarded. The user starts by creating a template business process by laying out the activities and then configuring them one at a time. The user drags and drops the CreditProcess WSDL and configures the business process as the providing partner of the service. The user configures the Receive and Reply activities to implement the PortType specified in the CreditProcess WSDL. The user then drags and drops all the other WSDLs and configures the business process as a consuming partner of those services. The user uses one invoke activity per service consumed and configures the invoke activity to link it with the appropriate Partner Link. Once configured, the business process looks similar to Figure 6.
Create and Deploy Composite Applications In the sample used in this article, the user adds the business process module from the project CreditApplicationProcessorBusinessProcess to the Composite Application project. The composite application is then deployed at runtime. Reader Feedback: Page 1 of 1
Enterprise Open Source Magazine Latest Stories . . .
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||