Apps Integration Cookbook
Apps Integration Cookbook
Introduction........................................................................................................................................................4
Oracle BPEL Process Manager ...................................................................................................................4
Integration Types...........................................................................................................................................5
How To Use This Document......................................................................................................................5
Chapter 1: Available TECHNOLOGY INTERFACES .............................................................................7
Oracle E-Business Suite ...............................................................................................................................7
Business Event System.............................................................................................................................7
XML Gateway ...........................................................................................................................................7
Oracle e-Commerce / EDI Gateway.....................................................................................................7
Concurrent Program / Interface Tables................................................................................................8
PeopleSoft Integration Tools.......................................................................................................................8
Integration Broker ....................................................................................................................................8
PeopleTools ...............................................................................................................................................8
Component / Service Interface – APIs.................................................................................................8
Application Message.................................................................................................................................9
File Layout .................................................................................................................................................9
JD Edwards Web Services Gateway Components ...................................................................................9
Broker .........................................................................................................................................................9
Integration Server .....................................................................................................................................9
Integration Point .......................................................................................................................................9
XBP...........................................................................................................................................................10
Canonical..................................................................................................................................................10
Cross-Application Integration Using BPEL............................................................................................11
Service Discovery: Business Service Repository.....................................................................................12
Oracle Integration Repository...............................................................................................................12
Oracle Interactive Services Repository ................................................................................................13
Chapter 2: Process Oriented Integration: A PRACTICAL USE CASE ................................................14
Interface / Use Case 1: Item Availability.................................................................................................16
Interface / Use Case 2: Order Confirmation ..........................................................................................18
Interface / Use Case 3: Shipment Confirmation ....................................................................................19
Interface / Use Case 4: Invoice Notification ..........................................................................................21
Chapter 3: How to Connect BPEL and Oracle E-Business......................................................................23
BES to BPEL ...............................................................................................................................................23
BPEL to BES....................................................................................................................................................27
BPEL to Oracle E-Business API ..............................................................................................................28
Chapter 4: How to Connect BPEL and Peoplesoft application ...............................................................32
BPEL Consuming Peoplesoft Web Service ............................................................................................32
INTRODUCTION
Over the last 20 years, organizations invested heavily in automating specific business tasks and processes.
This proved to be a good investment increasing productivity across the board and improving productivity
exponentially. However, it did bring up some issues. How do you not just make your business process
automated, but optimized? How can I ensure that the data used by all systems is the same and of high
quality? How can I instrument my business processes to include relevant contextual information for key
decision makers? All at the same time improving the ability for my organization to react and keeping costs
low? While there is no one answer for all these questions, one technology helps to address all the points
outlined above – Integration. Integration is common requirement across all of these problems.
Oracle E-Business Suite, PeopleSoft and JD Edwards have recognized the importance of integration and
have opened up several key integration points into our applications at a business process level, the event
level and the API level. IT organizations utilize these efficient and flexible platform-neutral integration
points to seamlessly participate in business process orchestration environments, such as Oracle BPEL
Process Manager. Business process orchestration takes application integration to the next level by using an
application independent rules engine to manage business processes that span multiple applications.
Integration Types
To fully leverage the power of integration, its imperative that you understand the various types of
integration possible. Integrations can be broadly classified into the following categories:
Synchronous: Synchronous Integration is a request response mode of operation between two
systems. In short, the calling application expects a response from the provider when a method on
the latter is invoked in the same thread. For example, a customer creates a Purchase Order in the
E-Business Suite by invoking a Purchase Order Service and the application generates the PO
number as a response in real time. This PO number is then used as a reference to complete other
related activities.
Asynchronous Integrations: Asynchronous Integration solutions are helpful when enterprise
applications take an indeterminate amount of time to respond to a calling application. In this case,
the initiating application sends the request and proceeds with its own actions without having to
wait for the provider application to process in the same thread. The provider application picks up
the request at a later stage and processes the message. For example, in an Order to Cash flow the
buyer could put in a request for products and does not have to wait for the supplier to respond
right away to perform other steps in the process.
Batch Integrations: Batch integrations allow you to import or export large batches of data that
are collected over a period of time into the system. Typical end-of-day transactions or scheduled
data synchronization routines utilize this technique. For example, updated customer data collected
through various applications in the IT ecosystem is consolidated into a single source as an end of
day process.
Process Oriented Integrations: Process Orchestration takes application integration to the next
level by using an application independent state engine to manage business processes that span
multiple applications. Process Orchestration can involve system-to-system integration, system to
human task integration, or human task to human task integration. For example, automating an
Order-to-Cash or a new employee process flow. Such a process could involve orchestrating
integration across multiple enterprise applications.
XML Gateway
Oracle XML Gateway is a set of services that allows easy integration with the Oracle E-Business
Suite to support XML messaging.
Oracle XML Gateway consumes events raised by the Oracle E-Business Suite and subscribes to
inbound events for processing. Oracle XML Gateway uses the message propagation feature of
Oracle Advanced Queuing to integrate with the Oracle Transport Agent to deliver messages to and
receive messages from business partners. Oracle XML Gateway supports both Business-to-
Business (B2B) and Application-to-Application (A2A) initiatives. B2B initiatives include
communicating business documents and participating in industry exchanges. An example of an
A2A initiative is data integration with legacy and disparate systems.
With Oracle XML Gateway services, you are assured consistent XML message implementation
when integrating with the Oracle E-Business Suite, thereby lowering integration costs and
expediting message implementation while supporting corporate e-business initiatives.
For more information please visit this web site:
http://download-west.oracle.com/docs/cd/B12190_11/current/acrobat/115ecxug.pdf
Integration Broker
PeopleSoft Integration Broker is a middleware technology that facilitates synchronous and
asynchronous messaging among internal systems and trading partners, while managing message
structure, message format, and transport disparities.
PeopleSoft Integration Broker comprises two high-level subsystems: the Integration Engine and
the Integration Gateway. The Integration Engine runs on the PeopleSoft application server. It is
tied closely to PeopleSoft applications and produces or consumes messages for these applications.
The Integration Gateway is a platform that manages the actual receipt and delivery of messages
passed among systems through the PeopleSoft Integration Broker. It provides support for the
leading TCP/IP protocols used in the marketplace today, and more importantly, provides
extensible interfaces for the development of new connectors for communication with legacy, ERP,
and internet-based systems.
PeopleTools
PeopleTools refers to the collection of proprietary PeopleSoft tools for the development and
execution of applications.
File Layout
A File Layout object is a definitional map between a file (fixed format, comma separated values or
XML) and a PeopleSoft Record definition. Creating File Layout objects requires just a few mouse
clicks once you have a Record definition and sample file. Once you have created a File Layout
object in PeopleTools 8.42 and higher, you can click the AE button in the Application Designer to
have PeopleTools write the Application Engine PeopleCode for you that will load the file from the
file server into PeopleSoft Records. For more information and examples see the Enterprise
PeopleTools 8.46 PeopleBook: PeopleSoft Application Designer > Understanding File Layouts.
Broker
The broker is a high-speed message router. It is the primary component of the platform’s
messaging facility. It uses a publish-and-subscribe model for asynchronous processing.
Integration Server
The integration server is the platform’s central runtime component and the primary engine for the
execution of the integration logic.
Integration Point
An Integration Point acts as the connection between the physical implementation and the logical
business function. One can say that a system exposes its business functionality as Integration
Points.
Canonical
Canonical events are generic representations of data (both data structure and data content) created
and published by a source integration within XPI Enterprise Integrator and subscribed to by one or
more target integrations.
Note: The recommended practice is to look up the desired integration point in ISR.
http://www.peoplesoft.com/corp/en/products/dev_integration_portals/isr/index.jsp
Customer Relationship Management is handled in PeopleSoft Enterprise. PeopleSoft CRM is the
primary source of customer information. All quotes and sales orders are captured in PeopleSoft
CRM. Inventory Management on the other hand is handled in J.D. Edwards EnterpriseOne.
Information such as Item Master details, Item Availability, etc., are stored in J.D. Edwards
EnterpriseOne.
When an order is captured in PeopleSoft CRM it is necessary to check availability of the item in
J.D. Edwards EnterpriseOne. This integration occurs in real time. It involves triggering a BPEL
process that invokes a web service exposed by J.D. Edwards XPI. The web service executes a
business function on the J.D. Edwards Enterprise Sever. The web service returns the quantity
available in J.D. Edwards and PeopleSoft CRM should then decide if the order quantity can be
fulfilled or not.
SCM_GET_
PROD_AVAIL HTTP Connector
BPEL
HTTP Connector
SCM_GET_
PROD_AVAIL
ItemAvailabilityQueryTarget
EIP
3. ItemAvailabilityQuery
JDE IP
XPI 4. ItemAvailabilityRe sult
Flow Details:
Step Flow
1 Availability of an item is checked during order entry in
PeopleSoft. A BPEL process is invoked that takes the
request from PeopleSoft and sends it to JDE XPI.
2a BPEL Process invokes ItemAvailabilityQueryTarget IP which
is exposed by JDE as a web service.
2b ItemAvailabilityQueryTarget IP to be exposed as a web
service.
3 XPI EnterpriseOne adapter triggers the IP. EnterpriseOne
processes the item availability request.
4 The EnterpriseOne Adapter receives the result and passes it
on to the XPI Integration Server.
5 Result is passed to the BPEL PM .
6 BPEL PM receives the result, transforms it and sends it to
PeopleSoft
F4201 – Order
CRM_SALES_ HTTP Connector Detail
ORDER BPEL
F4201 – Order
Header
SalesOrderManageNotifyTarget
Sales Order
Master Business
Function
EIP
SalesOrderManageNotify
JDE
IP
XPI
SalesOrderManageResponse
Flow Details:
F4201 – Order
Detail TARGET:
SalesShipment
ManageNotice
Notify
F4201 – Order
Header
Pick/Pack/Ship
Generate
Invoice
BPEL
Create/Process Order
Oracle Create Sales
Order Creation Response Order
Adapter
Flow Details:
Step Flow
1 When the sales order is shipped in J.D. Edwards
EnterpriseOne, a real time notification is sent to the XPI
EnterpriseOne Adapter.
2a E1 processes the source message and converts it to a
common view.
2b A target IP will convert the common view to any desired
format.
3 A BPEL process processes the target message and invokes
the Oracle Application Adapter.
4 Oracle Application Adapter generates the order in E-
Business Suite.
5 Result is passed to the BPEL PM.
6 BPEL PM receives the result and completes the process.
PeopleSoft
Oracle Enterprise
E-Business Suite
CRM_SALES_
Partner Link: ORDER_STATUS
Update PSFT Invoice Info
CRM
Flow Details:
Step Flow
1 When an invoice is generated in Oracle E-Business
Suite, the notification is sent to the BPEL PM via the
Oracle Application Adapter.
2 The BPEL process triggered initiates a partner link to
PeopleSoft to update the invoice details.
3 PeopleSoft sends the response back to the BPEL PM.
4 The BPEL process also invokes a J.D. Edwards web
service to update the invoice information in
EnterpriseOne.
5 The “Order Status Update (?)” IP will be triggered to
update the invoice information in EnterpriseOne.
6 The result from JDE E1 is passed to the BPEL PM.
7 BPEL PM receives the result and completes the process.
BES to BPEL
The following sections document how a BPEL process can be launched from the Oracle E-Business Suite
using the Business Event System.
Flow
The following is the simple 3-step procedure to launch a BPEL process from the Oracle E-Business Suite:
1. Applications within the Oracle E-Business Suite raise Business Events.
2. A Java Subscription for the business event raised triggers the BPEL process in the Oracle
Application Server.
3. The BPEL Process is launched using the Java RMI interface in the Java Subscription.
Set up
The following set up steps are required before the BES – BPEL integration can be achieved.
Deploy Your BPEL Processes – Any BPEL process intended to be launched from the Oracle E-
Business Suite must first be deployed in the Oracle BPEL Process Manager. Use the deployment
tool, such as obant, provided with Oracle BPEL PM to deploy them.
Concurrent Processing Node Environment Settings – The Java deferred agent listeners are Java
processes running on the Concurrent Processing node of your Oracle E-Business Suite instance.
For the Java subscription to be executed correctly, you must copy the following jar files to the
Concurrent Processing node and update the Java class path (AF_CLASSPATH) environment
variable.
Note: Please use the standard procedures documented in the MetaLink Note 130091.1 to
update the AF_CLASSPATH variable.
1. Obtain the following BPEL libraries and place them in a location, for example:
/u01/app/apps11510/java/bpelbes/
Your Oracle E-Business Suite
• orabpel-common.jar
System Administrator must
• orabpel-thirdparty.jar perform this step.
RMI Interface
The Java class file in Appendix A, InvokeBPELSub.java provides you with a sample
Java subscription. The subscription class shows how the Java RMI interface provided by
Oracle BPEL Process Manager is used to invoke the CreditRatingService process.
Message Structure
The Java subscription is responsible for constructing the message structure required by the
BPEL process being launched. In the sample subscription, the input message to the
CreditRatingService process is constructed within the Java Subscription by obtaining the
SSN value from the event, and creating the XML string. You could also use the generate
function capability of BES to generate the message when the event is raised. Please refer to
BES documentation for using the generate function. However, please note that BES does
not perform any XML content verification of the generated message before processing the
Java subscription.
Security
The subscription sample hard codes the BPEL server information and any authentication
required when submitting the request. You must store the authentication information in
your own schema/tables in a secure manner. Tools such as the DBMS_OBFUSCATE
database package can be leveraged to encrypt and decrypt password values.
Limitations
This technical white paper is designed to work only with deferred Java subscriptions (phase
>100). Synchronous Java subscriptions for events raised in the Apache middle tier are not
supported.
The following is the simple 3-step procedure to trigger business logic in Oracle E-Business Suite from
BPEL
1. The database adapter shipped with the Oracle BPEL Process Manager is used to connect to the
Oracle E-Business Suite.
2. The BPEL Process Manager raises a Business Event within an invoke activity, linked to the
database adapter service
3. The Event Manager within the Oracle E-Business Suite will then process subscriptions to this
event. The subscription can trigger application logic or a workflow process.
Set up
Register Business Event – Register the business event to the process interactions from BPEL.
Please refer to the “Managing Business Events” section of the Oracle Workflow Developer’s Guide to
learn how to create business events. If you already have an event, you can skip this step and
proceed to the next step.
Register Subscription – You must register a “Local” subscription to the event raised by the BPEL
process. Please refer to the “Managing Business Events” section of the Oracle Workflow Developer’s
Guide to learn how to create subscriptions for business events. You can leverage the entire range of
capabilities of BES when processing events raised by BPEL. You can choose any Action Type as
per your needs. You can send the event to a waiting workflow, execute custom PL/SQL logic, or
execute Java logic. When defining a Java subscription, choose source type to be “Local”, choose
the “Custom” action type, and enter the Java class name in the “Java Rule Function” field.
Specify the connection parameters as shown in the below figure. The JNDI name refers to the runtime
connection and points to the logical deployment of the adapter.
Create a new Message Node in PIA that will represent all external systems that will invoke the CI-based
web services. The name of this node is arbitrary. Choose one that makes sense for your environment. In
the Node Info tab, specify Node Type: External, Routing Type: Explicit, and set the node to Active. For
Authentication, either choose “None” or “SSL,” depending on your corporate security policy. In the
example below, the node is called “THIRDPARTY.”
The following steps must be performed for each CI that you want to web service enable:
• In the Application Designer, either verify the existence of, or create and test a component interface
based on the component you want to web service enable.
For more information on creating and testing CI’s, see the Enterprise PeopleTools 8.46
PeopleBook: PeopleSoft Component Interfaces
http://peoplebooks.peoplesoft.com:8900/PSOL/pt846/eng/psbooks/index.htm
• Create a permission list and role for the CI. The permission list and role should not have any menu
navigation privileges. If someone were to try to log in to the application in a web browser or
Application Designer using an ID with this role/permission list, they should be denied login or not
be able to access anything.
• Grant the permission list you created in the above step access to the SOAPTOCI web library.
• Grant the role you created above to the appropriate PeopleSoft user ID’s. If the user has only the
above role/permission list, then the user will not be able to do anything in the application other
than execute the named component interface.
• In the Integration Broker Web Services Menu, select the CI and click the WSDL link to generate
the WSDL that BPEL PM will consume. You must have permissions on each method of the CI
that you want to generate WSDL for.
Synchronous messages can be exposed via web services, regardless if they are rowset-based (structured) or
nonrowset-based (unstructured). This section explains how to web service enable Application Messages as
synchronous web services.
Note: If an unstructured message does not have an associated schema, the schema section of the WSDL
document will be incomplete. You must either associate a schema with the message or modify the schema
section of the WSDL so that the WSDL document completely describes the message. If you are using a
delivered unstructured message where a schema has been associated, that schema will appear in the WSDL.
This functionality uses the basic PeopleSoft Integration Broker infrastructure with one exception: At
runtime SOAP request messages are sent to a specific listening connector on the gateway.
External parties send web service requests to the PeopleSoftServiceListeningConnector, which is
responsible for stripping the SOAP envelope and forwarding the request to the application server for
processing. The application server receives the request as it would any other message, and invokes the
appropriate message processing.
There are two primary differences between CI and message based web services:
• In a CI based web service, all of the logic already exists in the component. You do not have to add
any business logic to a CI. In Application message based web services, if there is no delivered logic
in a message event, you must code the logic yourself.
• To invoke a CI based web service, the invoking system must always supply a valid PeopleSoft
username and password, with the correct permissions, in order to invoke the specified service.
Application Message based web services never take a username and password. They can be
secured, however, using digital certificates, SSL, or a node password. For more information see
Enterprise PeopleTools 8.46 PeopleBook: Integration Broker > Setting Up Secure Messaging
Environments.
For synchronous message based web services, the request message must have an OnRequest event. See
below:
Use the Integration Point Wizard to configure the Inbound Synchronous Transaction. Advanced users can
configure the Inbound Synchronous Transaction manually on the BPEL node definition.
With the transaction created, you are now ready to generate the WSDL for the web service. The WSDL
generator can be found under Integration Broker > Web Services > Published EIPs. Select Message and
then specify the node that represents your BPEL system and its request message. Then click Search.
The following sections appear. If this does not appear, click Diagram View and double click
CURRENCY.bpel in the Applications Navigator section. See the Oracle BPEL Process Manager Developer’s
Guide for a description of these sections.
Provide a partner link name. Click on the first icon in the WSDL Settings frame to select the WSDL file
from file system. Select the WSG WSDL you copied to the project directory.
The Designer will display the following message:
Click Yes to automatically create partner link types. Designer will create the partner link type and populate
it. Keep My Roles filed as Not specified and populate Partner Role with the value available in the drop
down. Click OK to close the partner link setting and save the bpel file.
Drag and drop an “invoke” BPEL activity to the Main scope and point it to the Partner Link configured in
the previous step. The Input and Output Variables to this “invoke” activity are Global variables and are
named as “FindInput” and “FindOutput” in the example. Please refer to the BPEL Developer’s Guide for
detailed steps. The CI WSDL contains many different operations – “Find”, “Get”, “Create” and “Update”.
This example uses the “Find” operation.
The above operation takes on a <SecurityHeader> element in addition to the input. Create a Global Variable
to point to the <SecurityHeaders> element in the Partner WSDL as shown in the following steps:
To compile and Deploy the BPEL process, right-click on the project in Application Navigator. Select
Deploy > connection name > Deploy to Default Domain. Click OK. This will compile and deploy the BPEL
process. Watch the bottom of the screen for any errors. Refer to the BPEL Developer’s Guide for more
information.
The Subscription event contains or calls the code to read and do something with the incoming XML
payload. The code may or may not send back a response message. You can have more than one
subscription active but there is no way to designate or determine which one will fire first.
If message processing order is important, make sure the message is assigned to a channel that you can
partition by the appropriate process-order-determining field. If a channel is set to use ordered processing
(default) and you have not selected any partitioning fields (default), sever bottlenecking performance issues
can result.
In the example below, the DELETE_USER_PROFILE channel is partitioned on the OPRID (primary
key) field. If a message for a particular OPRID errors, messages for all other OPRIDs will continue to be
processed. If no field was selected for partitioning, then if any message would error then all processing
would be stopped for all new messages to enter the channel until the original error is resolved.
Use the Integration Point Wizard to configure the Inbound Asynchronous Transaction. Advanced users
can configure the Inbound Asynchronous Transaction manually on the BPEL node definition.
There are no transformations in this example. On your site, you may end up transforming an inbound
SOAP request to a rowset-based message and transforming a rowset-based response to a non-rowset-
based SOAP response. The Integration Point Wizard will walk you through all the steps. See the example
below.
High level view of the steps to consume a synchronous BPEL PM web service:
• Import the WSDL into PeopleSoft using the WSDL Import Wizard.
• Use the wizard to create the metadata for each service operation you want to invoke.
• If you are using XMLDoc PeopleCode to invoke the service, add the code to an app class and/or a
component and you are done. If you are using XSLT to transform from structured messages to
unstructured messages, continue on to the following steps:
• Create the XSLT for the outbound request. A graphical mapper is included with BPEL PM if you do
not wan to write the code manually.
• Create the XSLT for the inbound response.
• Create an IB outbound transaction on the BPEL (3rd party node) for the structured messages.
• Create the IB Relationship and Transaction Modifier to apply the XSLT to transform structured
messages to/from SOAP messages.
• Optional: Use the Integration Point Viewer to review the configuration.
High level view of the steps to consume an asynchronous BPEL PM web service:
• Import the WSDL into PeopleSoft using the WSDL Import Wizard.
• Use the wizard to create the metadata for each service operation you want to invoke.
• If you are using XMLDoc PeopleCode to invoke the service, add the code to an app class and/or a
component and you are done. If you are using XSLT to transform from a structured message to an
unstructured message, continue on to the following steps:
• Create the XSLT for the outbound message. A graphical mapper is included with BPEL PM if you do
not wan to write the code manually.
Find the WSDL for the service you want to consume. The WSDL for this service is at
www.webservicex.net/uszip?WSDL
.
In the example below, simply copy and past the URL and header information from the test page in to the
appropriate fields, then copy and past the sample SOAP request into the Input Information Section.
Finally, replace “string” in the SOAP message with your actual zip code. Then click POST. If you don’t get
a valid SOAP response, either you have connectivity issues or the provider is unavailable.
The bottom line is that if SendMaster can’t successfully invoke the web service, then don’t waste your time
trying to get PeopleSoft to do it.
Click Next and specify the names of the request and response messages for consuming the service. These
are non-rowset-based (unstructured) messages. If you choose Create a New Message, the wizard will create
the messages in the application designer for you. Click Next.
In the example below, we are specifying the web services channel because it is a synchronous web service.
After you specify the channel, click Next.
Notice that the Create link has been replaced with a delete link for deleting the integration metadata.
Note, if you want to delete and recreate the integration metadata for invoking the web service operation,
you must delete the transaction by clicking this Delete link. Deleting the transaction from the Node
Definition page is not enough.
Before we use the Integration Point Wizard to create the remaining integration metadata, we must first
verify the existence of, or create, the structured messages and the transformation programs. Create the
following two structured messages by dragging or inserting the ADDRESS_SBR record into the
VERSION_1 folder of the message. Notice that in the ADDRESS_ZIP_REQUEST message, only the
POSTAL field is checked in the Include column. Also notice that in the
ADDRESS_CITY_STATE_RESPONSE message has only the City and State fields checked in the
Include column.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="ZIP_REQUEST">
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<a:GetInfoByZIP xmlns:a="http://www.webserviceX.NET">
<a:USZip><xsl:value-of
select="MsgData/Transaction/ADDRESS_SBR/POSTAL"/></a:USZip>
</a:GetInfoByZIP>
</soap:Body>
</soap:Envelope>
</xsl:template>
</xsl:stylesheet>
Here is sample XSLT code that you can use. If you don’t know how to write XSLT code, you can use the
graphical XSLT mapper in JDeveloper and have it write the code for you
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="//Table">
<ZIP_RESP_XSL>
<FieldTypes>
<ADDRESS_SBR class="R">
<CITY type="CHAR"/>
</xsl:stylesheet>
Navigate to Node definitions and select the web service provider node.
Optional: Edit the transaction that the WSDL Import Wizard created for you to show full logging. This
will allow you to see the XML being sent between PeopleSoft and the web service provider.
Click Add and Set the Result Transaction Type to OS, outbound synchronous. It will be the only choice in
the list. Then specify the names of the request and response Application Engine transformation programs,
ZIP_REQ_XSL and ZIP_RESP_XSL. Click Save.
try
You are now ready to consume an external web service or initiate a BPEL PM process from a PeopleSoft
application.
For more information on importing WSDL and consuming BPEL and other external web services see the
section, “Creating Third-Party Integrations Using WSDL” in Enterprise PeopleTools 8.46 PeopleBook:
Integration Broker. You may also want to look at the section, “Developing Transformations.” Other
sections in the same book worth reviewing are “Applying Transformations” and “Configuring
Relationships.”
You are now ready to consume the EnterpriseOne Integration Point provided web service.
The following sections appear. If this does not appear, click Diagram View and double click
GetCustomerCreditInfo in the Applications Navigator section. See the Oracle BPEL Process Manager
Developer’s Guide for a description of these sections.
Double-click on the service just created in the navigation pane to open the editor for the service.
Click on Input/Output tab in the service editor. From the list of available types, choose object to create
two input objects: soapRequestData and soapResponseData. Create and output object soapResponseData.
Double-click on document type in the navigation pane to open the editor. Create elements as follows:
To create output document type, select File > New to invoke the New Object wizard. Choose Document
Type and click Next. Choose the document type name and location. Click Finish to create the document
type. Double-click on output document type in the navigation pane to open the editor. Create elements as
follows:
• From the variable list choose Document element. This top level element has to be named in a
specific format. Choose any namespace name. This element must be named as namespace name:
flow service local name e.g wm:GetPhoneServiceMSG. Click on the element and change its XML
namespace property. This must have the same value as namespace name of service.
• Create another Document element as child of this root element. Name this element as document
identifier. E.g. GetPhone.
• Create Document element Request under second document element.
• Create same input variables under request as in 8.d.
• Create Dcoument element Response under second document element.
Next, create the service flow. Double-click on the flow service in the navigation pane to open the service
editor. Click on Insert and choose Browse. Locate WmPublic package. Navigate to Pub/Soap/Utils.
Choose getBody method. Click on inserted step. Choose Pipeline tab in lower frame and map
input/output as follows:
Map body from Pipeline In to node in Service In. Choose makeArrays in ServiceIn and click on Set Value.
Set the value to False. Choose nsDecls and click on Set Value. In the set value dialog, click on Add Row
button on extreme right top corner. Put name as the namespace name you selected for document type. Put
Value as XML namespace value of the service. Both of these values come from step 8.a above.
Choose documentTypeName and click Set Value. Set the value as fully qualified name of the input
document type created as in the Example: PSFT_BPEL_PM_Tests.Docs:GetPhoneInput). Click on
Pipeline Out frame. Do the same setting for nsDecls.
Insert new Document Reference variable and choose Input Document type, created in step 8, in the dialog
box that appears. Give it your desired name.Map document from Service Out to Document Reference just
created in Pipeline Out. Drop node, makeArrays, body, documentTypeName and document objects from
Pipeline Out.
Insert the BSFN Adapter service that will call EnterpriseOne BSFN for this task. Click on the inserted step
and choose Pipeline tab from the lower frame to map input/output parameters as follows:
Set Host name to machine name or IP. Do not use localhost.Set protocol to SOAP-MSG. Directive should
remain default. Click on folder icon next to Input to choose Input document type created for the service.
Similarly, choose output document style created for the service. Set the value of Target namespace to the
XML namespace used for the service. Click OK. Choose the destination folder to save the file. Designer
will display message that WSDL was successfully saved.
In the project properties dialog, select process name, and choose Synchronous service from Template
dropdown. Click OK.
Browse to the project directory from explorer and copy the WSDL generated from WSG Developer to this
folder.
Locate the Request and Response elements in the schema. Modify the Request and Response element
schema as required for the service. As a reference for this, use elements under Request and Response
schema in the copied WSG WSDL file. These elements can be copied from WSG WSDL to process
WSDL with minor modification of namespace. Diagram above shows resulting WSDL for this example.
Now double-click on <processname>.bpel file to open it in editor. Right-click on either side of BPEL
process (in yellow area) and choose create partner link option.
Click on Yes to automatically create partner link types. Designer will create partner link type and populate
it. Keep My Roles filed as Not specified and populate Partner Role with the value available in drop down.
Click OK to close the partner link setting and save bpel file.
Next follow the BPEL Developer’s Guide to add the following items to the BPEL file.
• Scope Activity
• Invoke construct
• Assign construct
Follow the guide to validate the BPEL file and save the file. To compile and Deploy BPEL process, right-
click on project in Application Navigator. Select Deploy > connection name > Deploy to Default Domain.
Click OK. This will compile and deploy the BPEL process. Watch the bottom of the screen for any errors.
Refer to the BPEL Developer’s Guide for more information.
//BES library
import oracle.apps.fnd.wf.bes.BusinessEvent;
import oracle.apps.fnd.wf.bes.BusinessEventException;
import oracle.apps.fnd.wf.bes.SubscriptionInterface;
import oracle.apps.fnd.wf.bes.server.Subscription;
import oracle.apps.fnd.wf.common.WorkflowContext;
/**
* This class demostrates how to invoke a BPEL process from a BES
subscription
*/
public class InvokeBPELSub implements SubscriptionInterface
{
public void onBusinessEvent(Subscription eo, BusinessEvent event,
WorkflowContext context) throws BusinessEventException
{
try{
// properties in the classpath
// You can also store these values as Profile options and
access them in the subscriptions
// This way you can avoid hardcoding this information in
every subscription
Properties props = new java.util.Properties();
//sets target bpel platform, oracle installation, this will
be oc4j_10g
props.setProperty("orabpel.platform","oc4j_10g");
//sets jndi factory class, this is used to locate remote RMI
server
props.setProperty("java.naming.factory.initial","com.evermind.server.
rmi.RMIInitialContextFactory");
//sets target url for target rmi server (oc4j
props.setProperty("java.naming.security.credentials","welcome");
System.out.println(props);
nm.addPart("payload", xml );
NormalizedMessage res =
deliveryService.request("CreditRatingService", "process", nm);
//you can store the result back from BPEL process into
business event if it is required
// string value of payload should be something like
// <rating xmlns="http://services.otn.com">560</rating>
event.setStringProperty("creditRate", ""+
payload.get("payload"));
System.out.println("Credit Rate:"+payload.get("payload"));
}catch(Exception e)
{
//
//propagate the exception to BES, the last flag indicate this
exception is
//a true error so BES will invoke defined error handling logic
//
throw new BusinessEventException("Failed to start BPEL
process", e, true);
}
}
}
import java.sql.Connection;
import java.util.Date;
import javax.sql.DataSource;
import oracle.apps.fnd.wf.bes.BusinessEvent;
import oracle.jdbc.pool.OracleDataSource;
/**
* Sample code to programmatically raise an event
*/
public class RaiseEvent
{
static String mEvent = "oracle.apps.fnd.wf.bes.sample.bpel.invoke";
public static void main(String[] args)
{
Connection conn=null;
try
{
conn=getJDBCConnection();
//takes event name and event key
BusinessEvent businessEvent =
new BusinessEvent(mEvent, ""+System.currentTimeMillis());
businessEvent.setStringProperty("ssn","123-23-2331");
Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Worldwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200
oracle.com