Wednesday

OFM Adapter for XML Gateway

Refer to the introduction to OFM Adapter for Oracle Applications from my previous post here

Oracle XML Gateway is a set of services that allows bidirectional integration with Oracle Applications using OAG standard XML messaging. Oracle Applications utilize the Oracle Workflow Business Event System to support event-based XML message creation and consumption.

For XML Gateway inbound message processing, the inbound message will be placed in the ECX_INBOUND queue by the Oracle BPEL process. Agent Listeners running on ECX_INBOUND would enable further processing by the Execution Engine. Oracle XML Gateway picks this XML message, does trading partner validation, and inserts data into Oracle Applications.

For XML Gateway outbound message processing, the outbound message will be first en-queued to the ECX_OUTBOUND queue. Oracle BPEL PM listens to ECX_OUTBOUND queue for the message with the same correlation Id BPEL. The message will then be de-queued to retrieve outbound data and then the outbound map will be invoked to update Oracle Applications.

The message will have XML payload of the transaction (PO, Invoice, etc) along with message attributes called XML Gateway Envelope.


Case Study 1 scenario – inserting a Purchase Order transaction into Oracle Applications through XML Gateway inbound message map PROCESS_PO_007 exposed as a Web Service.

The customer’s PO is input to the BPEL along with the ECX Header properties. The BPEL pushes this PO to ECX_INBOUND queue. Agent Listeners running on ECX_INBOUND would enable further processing by the Execution Engine. Oracle XML Gateway picks this XML message, does trading partner validation, and inserts order data to Order Management in Oracle Applications.

Pre-requisites:
Setup XML Gateway Header Properties
Setup XML Gateway Trading Partner
Activate ECX Inbound Agent and ECX Transaction Agent Listeners

Configuring the Adapter to enqueue:
1. Create a new SOA BPEL project (Composite with BPEL template) in a SOA application. Select the BPEL process as asynchronous and exposed as a SOAP service.
Application Name: XMLGatewayApplication
Type: SOA Application
Project Name: Inbound_PO
Technology: SOA
Composite Template: Composite with BPEL process
BPEL Process Name: EnqueuePO

2. Create a Partner Link service for Oracle Applications XML Gateway in the BPEL process by selecting partner link type “Oracle Applications” under BPEL Services.
Partner Link Service Name: XMLGateway_apps1

3. Configure the database connection to connect to the Oracle Applications’ database. Database Host Name, User Name, Password, database Port and SID fields are to be configured in the connection.

4. The adapter configuration wizard starts the Oracle Module Browser pulling interfaces data from Oracle Integration Repository that are supported by Oracle Applications Adapter and displays in tree structure.











5. Navigate to Order Management Suite > Order Management > Sales Order > XML Gateway > Inbound: Process Purchase Order XML Transaction (root element PROCESS_PO_007)

6. The wizard generates the WSDL file corresponding to the XML schema.

7. Configure the BPEL process to invoke XML Gateway by adding Invoke activity and wire to the Partner Link for XML Gateway. Select the ‘Enqueue’ operation.

8. Set the ECX Header Message Properties. The following property fields needs to be configured.
jca.apps.ecx.TransactionType: 'PO'
jca.apps.ecx.TransactionSubType: 'PROCESS'
jca.apps.ecx.PartySiteId: 'Site123'
jca.apps.ecx.MessageType: 'XML'
jca.apps.ecx.MessageStandard: 'OAG'
jca.apps.ecx.DocumentNumber: 'order_xml_01'

9. Map the XML PO payload from BPEL input variable to Partner Link’s Variables > Process > Variables > Invoke_Enqueue_InputVariables > PROCESS_PO_007

10. Deploy and test the BPEL process.









Case Study 2 scenario – responding a trading partner with Purchase Order acknowledgement transaction from Oracle Applications through XML Gateway outbound message map ECX_CBODO_OAG72_OUT_CONFIRM exposed as a Web Service.

When the PO is created and approved, a workflow creates the PO Acknowledgement flow and sends out the PO Acknowledgement XML file to ECX_OUTBOUND queue.

Pre-requisites:
Setup XML Gateway for correlation identifier labeling messages meant for specific agent.
Setup XML Gateway Trading Partner

Configuring the Adapter to dequeue:
1. Create a new SOA BPEL project (Composite with BPEL template) in a SOA application. Select the BPEL process as asynchronous and exposed as a SOAP service.
Application Name: XMLGatewayApplication
Type: SOA Application
Project Name: Outbound_POAck
Technology: SOA
Composite Template: Composite with BPEL process
BPEL Process Name: DequeuePOAck

2. Create a Partner Link service for Oracle Applications XML Gateway in the BPEL process by selecting partner link type “Oracle Applications” under BPEL Services and connect to the Oracle Applications.
Partner Link Service Name: XMLGateway_apps1

3. In the Oracle Module Browser, navigate to Other Interfaces > Custom Objects >XML Gateway Maps> Outbound > ECX_CBODO_OAG72_OUT_CONFIRM (root element CONFIRM_BOD_004)












4. The wizard generates the WSDL file corresponding to the XML schema.

5. Configure the BPEL process to receive from XML Gateway by adding Receive activity and wire to the Partner Link for XML Gateway. Select the ‘Dequeue’ operation.

6. Map the XML PO Acknowledgement payload from Variables > Process > Variables > Receive_Dequeue_InputVariables > CONFIRM_BOD_004 to BPEL response output variable.

7. Deploy and test the BPEL process.











Similar integrations can be built for interfacing with Oracle Applications using e-Commerce Gateway, PL/SQL, Concurrent Programs, Open Interfaces Tables and Views.


References
OFM Adapter for Oracle Applications 11g - User's Guide (E10537-01)

No comments:

Post a Comment