Monday, November 23, 2009

ORacle B2B-concepts and architecture

Oracle B2B is an e-commerce integration product which is used for communication between enterprises using some protocols.

The most important things in B2B is know

1>who are the parties involved(host and trading partners)

2>What you want to trade(PO,Invoice)

3>How are you passing information (FTP,AQ)

Sender is always called as a host trading patner and the receiver is called as a remote trading partner.

Lets try to understand a simple scenario.

Let there are two trading partners A and B

A----->B2B---------->B

A is sending information to B here via B2B so for A it is outbound and for B it is inbound.

Similarly when B will send back a response to A it will be an outbound for B and inbound for A.

Consider a scenario.Where in we have back application as either BEPL/ESB for A.It will send the document to A ,this document will be a XML document as BPEL and ESB talks in xml language.A will pass this XMl to B via B2B.

So for any outbound message the information will first go in to a queue called IP_OUT_QUEUE.

B2B has a listener which continously polls on this queue.So as soon as it will pick a message in the queue it will trigger.So the information which is an XML document will now go to X-Engine(which is a validator cum translator).The X-Engine will now validate the XML document and convert it into native format because the Other end point B understands the native language only.

After validating and converting the information in to native format the
X-engine will send the information to the external delivery channel which will further point the message to the end point B.So this is the one way transaction.

So the scenario is

Application(backend-bpel/esb)----xml---->IP_OUT_QUEUE------->Listener------->X-Engine------->Conversion to native format---------->External delivery channel------->End point.


So The completed scenario is

A has send a purcahse order to B.

Now the next course of action is B will send an acknowledge ment to A.

Here is it important to note that B will send two acknowledgement to A.

One will be simple html acknowledgement and other will be a functional acknowledgement.

So the flow will be

A----->Purchase order--------->B
B----->Acknowledgement-------->A
B----->Functional ack--------->A

Functional acknowledgement is basically the response of the purchase order.

When B sends an functional acknowledgement to A it is is native format which is again converted in to xml format by the X-Engine and then it places the xml in to IP_IN_QUEUE.Again there is a listener associated with it which route the information to the end point.

Once A will receive a functional acknowledgement from B it will again send back an acknowledgement to B.So the whole process will be

A----->Purchase order--------->B
B----->Acknowledgement-------->A
B----->Functional ack--------->A
A----->Acknowledgement-------->B


This whole set of process is called as a transaction in B2B.


REgarding B2B document.

B2B document can be created using B2B document editor/B2B spec builder which has some predefine formats.Which i will cover later.

The document thus created are saved as .ecs file.B2B validate the document against .ecs file.

Now we will discuss about some terms

Document protocols.
=======================

Document protocols are some predefined standards.

Example: EDI-x12,EDI-Edifacts,HL7,Rossettanet,EbXML and custom etc.


Trasnport protocols.
========================

Transport protocols are the transport mechanism used to trasnport the message from one end to other.

Example-http,http(s),ftp,sftp,ftps,SMTP etc.

Package protocol
=====================

Package protocols are the packaging methods used to package the information.

Example-SMIME,SOAP,MIME etc.


Exchange protocol
====================

Exhange protocol is sum of trasport protocol and package protocol.

Example-AS2,AS1,RNIF,MLLP,Generic etc.



For every document protocol we have one or more exchange protocol.

Example

For EDI-X12 the exchange protocol is AS2(http),AS1(email)

For Rosettanet the exchange protocol is RNIF

For HL7 it is MLLP

For custom it is generic.


Business protocol
===================
Business protocol defines all the document ,exchange and transport protocol in a transaction.

so when we start a transaction we need to define following things

1.Business protocol
2.Trading partner
3.Agreements
4.Business Action.

Business action consist of following details

Who is the sender
who is th responder
Time to acknowledgement.
Retry count.
Acknowledgement mode.
Document Type.
Document Definition.
Document protocol parameters.


For Rossettanet the business action is know as collaboration.

Structure of a document
========================

The document consist of following four fields

Document protocols-EDI-X12
Document protocol revision-It is again predefined format eg-8050
Document Type-It is the actual payload eg 850
Document type defintion- 850.ecs

There are some other technical terms also

Operational capability and Communication capability

Communication capability

It has to be defined for both the trading partners.It defines the following details for the business protocol of a host or remote trading partner-Delivery channel details,Document exchange details and Trasnport details.


Operational capabilities

It defines the support for business actions or collaborations for the business protocol of a host or remote trading partner.

Oracle 10g B2B sounds very confusing with lot of terms and protocols involved.But once we will complete a end to end scenario as exercise we will get to know about each and every thing.But prior to that one must have the basic knowledge which what i have tried to explained here.There are many points missing and i will be covering all of them once i will come up with an exercise.


We have talked about two queues in B2B IP_OUT_QUEUE and IP_IN_QUEUE.These are the predefined queues that comes up with the installation.B2B by default uses these queue for storage of information.However once can use his own custom queue(aq based) to store the information.

These queues are based on IP_MESSAGE_TYPE structure whose definition is as

Name MSG_TYPE
MSG_ID Varchar(128)
INREPLYTO_MSG_ID Varchar(128)
FROM_PARTY Varchar(512)
TO_PARTY Varchar(512)
ACTION_NAME Varchar(512)
DOC_TYPE_NAME Varchar(512)
DOC_TYPE_REVISION Varchar(512)
MSG_TYPE Number(38)
PAYLOAD Clob
ATTACHMENT Blob

3 comments:

rithika said...

Thankyou for sharing such a valuble blog. FMCG Distribution

kavya said...

Thanks for sharing, it was informative. We play a small role in upskilling people providing the latest tech courses. Join us to upgradeORACLE B2B ONLINE TRAINING

kavya said...

Looking forward to getting more updates and we play a small role in upskilling people providing the latest tech courses. Join us to upgrade on ORACLE B2B TRAINNG