Articles
|
Mastering Service-Oriented Architecture: The BPEL Cookbook |
|
Integrating PeopleSoft CRM with Oracle E-Business Suite Using Oracle BPEL Process Manager
A step-by-step approach for integrating PeopleSoft 8.9 CRM with Oracle Applications 11i using BPEL
Many organizations have heterogeneous application portfolios that cross different departments, geographic locations, or subsidiaries. While multiple ERP systems may be necessary to meet the requirements of the business unit, they essentially result in data fragmentation. Integration of these systems is complex and traditionally handled in a proprietary manner; nevertheless, companies invest significant energy in integrating information spread across multiple ERP systems to make better business decisions. BPEL provides a standard, process-centric way to integrate disparate systems. Oracle's BPEL Process Manager, a key tool in Oracle Fusion Middleware for delivering service-oriented architecture (SOA), supports the industry-standard BPEL specification backed by Microsoft, IBM, SAP and BEA, and is widely recognized as an enterprise blueprint for reducing the cost, complexity, and inflexibility of integration projects. In this installment of The BPEL Cookbook, I'll present an approach for integrating PeopleSoft 8.9 CRM (PeopleTools 8.46) with Oracle Applications 11i using BPEL. Specifically, via a sample business scenario, you'll learn how PeopleSoft is configured to expose its modules as Web services and how the BPEL Applications adapter is configured to interact with Oracle apps. Functional ScenarioIn a typical order management business scenario, an order is entered into the CRM system and fulfillment occurs through the back-office ERP. In this example, we are using PeopleSoft as the front-office application to manage marketing, sales, and service operations and Oracle E-Business suite for ERP (order management, inventory, and financials). The business process considered here is the Quote-to-Order process. One part of this business process—quote and order entry—is executed in the CRM system, while order fulfillment is performed in the ERP system. To optimize internal operations, the entire cross-application Quote-to-Order business process needs to be automated. Here is the functionality available in this business process integration (see Figure 1): Sales Orders Creation in PeopleSoft
Figure 1 Here we will focus on the order creation step. For further details about other steps in this process, please refer to the Oracle Apps Integration Cookbook . Solution OverviewNow that you understand the functional business process, let's see how it's accomplished at the architecture level. Figure 2 provides a high-level overview of the participating components for a typical integration between PeopleSoft CRM and Oracle Applications with Oracle BPEL Process Manager as the integration platform. Figure 2 Enterprise Integration Points (EIPSs) are Web service connections that allow PeopleSoft applications to work smoothly with third-party systems and other PeopleSoft software. Upon submission of an order in PeopleSoft CRM, an EIP in PeopleSoft transforms it to XML format. This Order XML is then passed on to the attached PeopleCode method ( WSDL_ORDER ). (PeopleCode is the PeopleSoft programming language for enforcing business rules or performing other customizations.) WSDL_ORDER will convert the received Order XML into SOAP XML and send this request to the PeopleSoft remote node. The remote node is what handshakes with a configured Web service in BPEL Process Manager. A Web service can be invoked from PeopleSoft by mapping the remote node to the WSDL using Web Service Invocation Framework (WSIF) binding, which is strongly supported by BPEL Process Manager. Upon receiving this SOAP XML, the PeopleSoft node will invoke the Web service based on the WSDL imported and configured to this node. The Web service is invoked and executed in BPEL Process Manager. BPEL Process Manager processes the order data as SOAP XML and sends it to Oracle Applications; it internally leverages the Oracle Applications (OA) Adapter to communicate with 11i. OA Adapter is a pure JCA 1.5 Resource Adapter that can be used to send and receive messages from E-Business Suite. Oracle Applications exposes some of the seeded API and table to external Applications via this adapter. Oracle Applications processes the order and sends the acknowledgment; BPEL Process Manager receives this response and forwards it to the PeopleSoft node. The node will then respond to the PeopleCode, which requested for the Web service. The latter will retrieve the XML data and submit it to the configured component interface in PeopleSoft. A component interface is what exposes PeopleSoft components for synchronous access from another application (written in Java or PeopleCode). That's the high-level flow of Order data from PeopleSoft to Oracle Apps and back. In the next section, you'll learn how to expose PeopleSoft CRM modules as Web services, build a BPEL process, and configure the OA Adapter. Integrating PeopleSoft CRM with Oracle ERPOnce the order is submitted in PeopleSoft CRM, order information needs to be passed to Oracle Apps. There are three key steps in this process.
Let's take a deep drive into each of these steps: Step 1: Design the BPEL ProcessIn this step you will use BPEL Designer to create a process. BPEL Process Manager will receive the SOAP XML containing sales order information from PeopleSoft and transform it to the OA Adapter's XML format. (The schema will be generated by the OA Adapter automatically when the partner link is created for the calling API.) Then, the OA Adapter Partner link will be invoked and transformed and the Order XML submitted to Oracle Apps. The Oracle API will process the order and return the order number in output acknowledgment XML. BPEL Process Manager handles remote and binding faults. When a connection is not available, it retries five times and then throws an exception. When a binding exception occurs, the binding fault will be handled. A typical example of an integration business process designed for BPEL Process Manager is shown below. (Click image to enlarge) The critical activities in the process would be:
The following files, all available in the sample code download, will recreate the process described above in BPEL Designer.
You have now completed the design of the BPEL Process. Next, we'll take a detailed look at the configuration at the PeopleSoft end. Step 2: Configure OA AdapterOA Adapter is deployed in Oracle Containers for J2EE in managed mode. It can be used to send and receive messages from E-Business Suite. Here are the steps involved in configuring the adapter.
This completes the design of the BPEL process and the configuration of OA Adapter. Next (and finally), we'll configure PeopleSoft. Step 3: Configure PeopleSoftNow that you have created the BPEL process, let's look at the four-step process in configuring PeopleSoft.
Let's drill down into each of these steps. 1. Configure the PeopleSoft node to interact with the BPEL ProcessIn this step, you will configure a node to interact with BPEL Process. You will define the request and response messages and channels on which these messages will travel. First, import CreateOrder.wsdl (created previously) into PeopleSoft using the URL option. This identifies CreateOrder as the process, which will be invoked when an order is created in PeopleSoft. Upon importing the WSDL into PeopleSoft, the Integration Broker adds it to the WSDL repository. To import CreateOrder.wsdl, select PeopleTools > Integration Broker > Web Services > Import WSDL. You can now access the WSDL in the WSDL repository using the WSDL Repository page. Once the CreateOrder WSDL is imported into PeopleSoft, a remote node has to be configured to communicate with the BPEL process. To define this communication, you have to add the corresponding request message, response message, and message channel. To create a new remote node:
Click on the Next button to proceed to the next page in the WSDL Operation Wizard, where you select request and response messages for the service. Request and response messages are unstructured messages that you create in PeopleSoft to represent SOAP Request and Response messages. To create a new request or response message:
This completes Step 1. You imported the WSDL to tell PeopleSoft which Web service to call. You also defined node, messages, and channels to pass information to the Web service (BPEL Process CreateOrder). In the next step, you will establish a relationship between the Sales Order EIP and this newly configured node. 2. Establish Relationship Between EIP and NodeThis step will create a link between the CRM_SALES_ORDER EIP and the new node. When the CRM_SALES_ORDER EIP is published to the integration broker, the above-created link will send the CRM_SALES_ORDER message to the above-created node as a request message.
In this step, you will create the Application Engine program WSDL_ORDER. (Application Engine is the PeopleSoft high-volume application processor. Application Engine programs are developed with the Application Designer and can leverage common PeopleTools objects such as records, PeopleCode, and SQL objects.) WSDL_ORDER will transform the sales order message received from the EIP to a BPEL request (SOAP message) and publish the transformed message on the node channel. Add the following code to transform and send the request to the above-created node. Once the request is submitted to the node, the node will invoke the Web service configured to it. The Web service will be invoked and the response is sent back to the node, which sends the XML message to the PeopleCode method.
4. Linking WSDL_ORDER Apps Engine program with the node In this step, you will relate the transformation code to the CreateOrder node. Hence, whenever BPEL Process Manager is invoked, this transformation code will be executed. Create a new relationship WSDL_ORDER and map it to the node WSDL_ORDER. To do that: Select Relationships from the People Tools > Integration Setup and select Add New Value.
Conclusion With heterogeneous applications across multiple different business units, organizations have challenges aggregating information. Integrating these systems represents a huge investment. Now, as demonstrated here, such organizations have a choice to easily integrate such applications using standards like BPEL. |