Print Page

Tuesday, April 15, 2008

Oracle B2B and XML Gateway Integration

B2B XMLGateway Interoperability can be achieved in two ways.

1. ECX Queues : B2B has pre-seeded delivery channel for the XML Gateway Inbound and outbound queues such as ECX_INBOUND and ECX_OUTBOUND. Even though the Delivery channels are pre-seeded , there is a need to create the queues and the corresponding SQL are as follows.

connect apps/apps

drop type ECXMSG;
/

create type ECXMSG as OBJECT (
MESSAGE_TYPE VARCHAR2(2000) ,
MESSAGE_STANDARD VARCHAR2(2000) ,
TRANSACTION_TYPE VARCHAR2(2000) ,
TRANSACTION_SUBTYPE VARCHAR2(2000) ,
DOCUMENT_NUMBER VARCHAR2(2000) ,
PARTYID VARCHAR2(2000) ,
PARTY_SITE_ID VARCHAR2(2000) ,
PARTY_TYPE VARCHAR2(2000) ,
PROTOCOL_TYPE VARCHAR2(2000) ,
PROTOCOL_ADDRESS VARCHAR2(2000) ,
USERNAME VARCHAR2(2000) ,
PASSWORD VARCHAR2(2000) ,
PAYLOAD CLOB ,
ATTRIBUTE1 VARCHAR2(2000) ,
ATTRIBUTE2 VARCHAR2(2000) ,
ATTRIBUTE3 VARCHAR2(2000) ,
ATTRIBUTE4 VARCHAR2(2000) ,
ATTRIBUTE5 VARCHAR2(2000)
);
/

begin
begin
dbms_aqadm.stop_queue('ECX_INBOUND');
exception when others then null; end;
begin
dbms_aqadm.stop_queue('ECX_OUTBOUND');
exception when others then null; end;
begin
dbms_aqadm.drop_queue('ECX_INBOUND');
exception when others then null; end;
begin
dbms_aqadm.drop_queue('ECX_OUTBOUND');
exception when others then null; end;
begin
dbms_aqadm.drop_queue_table('ECX_INQUEUE');
exception when others then null; end;
begin
dbms_aqadm.drop_queue_table('ECX_OUTQUEUE');
exception when others then null; end;
end;
/

declare
begin
dbms_aqadm.create_queue_table('ECX_INQUEUE','apps.ECXMSG',multiple_consumers=>FALSE);
dbms_aqadm.create_queue_table('ECX_OUTQUEUE','apps.ECXMSG',multiple_consumers=>FALSE);
dbms_aqadm.create_queue('ECX_INBOUND', 'ECX_INQUEUE');
dbms_aqadm.create_queue('ECX_OUTBOUND', 'ECX_OUTQUEUE');
dbms_aqadm.start_queue('ECX_INBOUND');
dbms_aqadm.start_queue('ECX_OUTBOUND');
end;
/

connect system/welcome1
grant execute on apps.ECXMSG to b2b
/

exit;

XML Gateway enques the message to ECX_OUTBOUND queues and pick it from ECX_INBOUND queues. For outbound XML Gateway
should set the following ECX Headers.


MESSAGE_TYPE
MESSAGE_STANDARD
TRANSACTION_TYPE
TRANSACTION_SUBTYPE
DOCUMENT_NUMBER
PARTYID
PARTY_SITE_ID
PARTY_TYPE
PROTOCOL_TYPE
PROTOCOL_ADDRESS
USERNAME
PASSWORD
PAYLOAD
ATTRIBUTE1
ATTRIBUTE2
ATTRIBUTE3
ATTRIBUTE4
ATTRIBUTE5

among which TRANSACTION_TYPE, TRANSACTION_SUBTYPE,PARTY_SITE_ID,ATTRIBUTE1 are mandatory attributes. For inbound message, B2B enques the message to ECX_INBOUND queue with consumer name as b2buser, and the consuming application which is
XML Gateway in this case should use the same consumer name.

XML Gateway generates an OAGIS 7.x document, and there is a need to translate it to Edifecs XML before getting this processed in B2B as B2B mandates the incoming document to be Edifecs XML. B2B translates the Edifecs XML to native EDI using the inbuilt XEngine. To translate OAGIS to Edifecs XML use outbound call out and the
same is true in inbound case to translate the Edifecs XML to OAGIS document to be consumed by XML Gateway.


2. IP Queues : This approach used pre seeded queues IP_OUT_QUEUE and IP_IN_QUEUES with corresponding Delivery channel. Typical flow involves B2B Enques the message to IP_IN_QUEUE and BPEL Process consumes the message from IP_IN_QUEUE and send it to Ebiz suite using EBS adapter.

Refer the following Apps adapter documents which talks about various interface types for integrating with Oracle Applications:

http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28351/T430238T430241.htm
http://www.oracle.com/technology/products/integration/htdocs/ds_oracleas_ebs_adapter.pdf
http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28351/T430238T430340.htm

also refer various samples under 10.1.3.1\OracleAS_3\bpel\samples\tutorials\150.AppsAdapter

Monday, April 14, 2008

Deployment in Oracle B2B

Refer to Chapter 13 on Creating and Deploying a configuration.

Deployment through Script

The following sql stmt makes the agreements available for deployment.
SQL> update tip_agreement_t set lifecyclestate='Approved';

It is possible to write a script encapsulating the following public API.

ip/setenv.bat
java oracle.tip.configuration.ConfigurationManager
-standalone <congif Name> -- To create configuration based on all approved agreement.

java oracle.tip.configuration.ConfigurationManager -standalone <configName> <approved agrmtName1> <approved agrmtName2>

-deploy <configuration-name>
-abort <configuration-name>
-discard <configuration-name>
-retire <configuration-name>
-reactivate <configuration-name>
-queryName <configuration-name>
-queryStatus <configuration-lc-state>
-quiesce <configuration-name>
-quiesce allActive

Thursday, April 10, 2008

Rosettanet Exception handling in B2B

Exception/Error handling in Rosettanet

RosettaNet is an e-business standard based on XML which is predominently used in the High Tech Industries for the supply chain management needs. This standard talk about rapid, reliable process interaction between different trading Partner, and also about transport and packaging requirement.

Partner Interface Process (PIP) defines the sequence of steps required to execute a business process between two trading partners. PIPs are specialized, XML-based dialogs that define the structure, sequence of steps, role activities, data elements, values, and value types for each business document message exchanged between trading partners.

The RosettaNet Implementation Framework (RNIF) is a collection of specifications used to implement message exchange between trading partners over the Internet. It covers Transport,Packaging,Authorization,Authentication,Encryption and
Nonrepudiation.

Rosettanet Specification refers to two types of errors, in-band and out-of-band.

1. in-band error : This occurs during collaboration such as General exception and Receipt Acnowledge exception.

2. out- of -band error : This ocurs outside collaboration resulting in generation of 0A1. For e.g failure related to
time to perform, retry count etc. Currently B2B is not supporting this.

Exception scenarios

1. Outbound PO Processing : Back end application send the message to B2B, for any exception B2B sends the B2B Exception to Back end application.

2. Inbound PO Processing : For any message which failed during inbound PO processing, B2B sends RNIF exception to trading partner, Trading partner in turn has to consume the RNIF exception and generate a B2B exception corresponds to it.

3. Outbound POA Processing :For any message which failed during outbound POA processing, B2B sends RNIF exception to trading partner and B2B Exception to Back end application. Trading partner consumes the RNIF exception and sends B2B Exception to Back end application.

4. Inbound POA Processing :For any message which failed during inbound POA processing,B2B sends B2B Exception to Back end application.

Tuesday, April 8, 2008

PGP Encryption Support using External CallOut

Flexible File Naming convention in File and FTP transport

File name or directory name for File/FTP transport can be customized using various MACRO provided as part of Transport Parameters.

Use case : Consider a scenario where in the outbound file name has to be created based on

a. From Party
b. To Party
c. DocTypeName
d. DocTypeRevision
e. ActionName

Solution : There is an introduction of new File name format and Directory name format as transport parameters in File/FTP protocol.

e.g filename Format to be specified as %FROM_PATRY%_%TIME_STAMP%


The format for these parameters can be constructed by using following macros

Inbound:

%FROM_PARTY% (Sender Trading Partner Of Inbound Message)
%TO_PARTY% (Receiver Trading Partner Of Inbound Message)
%DOCTYPE_NAME%
%DOCTYPE_REVISION%
%ACTIONNAME%

Outbound

%FROM_PARTY% (Sender Trading Partner Of Outbound Message)
%TO_PARTY% (Receiver Trading Partner Of Outbound Message)
%DOCTYPE_NAME%
%DOCTYPE_REVISION%
%ACTIONNAME%
%MSG_ID%
%TIMESTAMP%

Note : configure the file name format as filename_format transport protocol parameter while defining the Delivery channel. You need to apply latest patch 7322333 on top of 10.1.2.3. For internal delivery channel use internal filename format parameter.

e.g filename format %FROM_PARTY%_%TIMESTAMP%.dat





P.S It is always advisable to apply the latest patch and not the patch mentioned in this post