Monday May 30, 2011

Implementing Oracle B2B 11g as a Hub

It has been discussed a number of times on OTN Oracle B2BForum that how Oracle B2B can be used as a HUB but there was no out-of-box solution available in 10g release. Understanding the importance of this requirement, Oracle B2B Product Development team have come up with an out-of-box solution in Oracle B2B 11gR1. Now Oracle B2B 11g can act as a hub without any additional configuration. In this blog post I will walk you through that how Oracle B2B 11g can be implemented as a hub and how actually it works.

In this example implementation, I will use three trading partners –

a)      OracleServices – This is the host trading partner and it will act as a hub
b)      MarketInc – This TP will send HL7 ADT_A01 document to a trading partner RetailInc through trading partner OracleServices
c)       RetailInc – This TP will receive the HL7 ADT_A01 document sent by MarketInc through OracleServices

So actually the message flow, which we will be implementing in this blog is –

MarketInc  <--- ADT_A01 ----> OracleServices (HUB) <--- ADT_A01 ----> RetailInc

Though the above flow demonstrates that MarketInc is sending the ADT to OracleServices but actually in it’s technical implementation, MarketInc will assume that flow is like –

MarketInc <----------------> RetailInc

So at MarketInc’s B2B server, the agreement(s) will be configured between MarketInc and RetailInc but channel location will be the one on which OracleServices B2B is listening for messages from partners.

Now to start with implementation, first of all create the HL7 document on Oracle B2B console –


As you can see in above picture, I have created two document definitions –
  1. ADT_A01_Def
  2. ACK_A01-Def
There is no specific configuration required in document definition creation. It is same as what you do while creating document for one-to-one communication.
After creating document, let’s configure the trading partners. Go to the “Documents” tab of remote TP “MarketInc” and add the created document definitions as below -


As you can see, we have configured MarketInc as sender of ADT and receiver of ACK. Similarly, configure RetailInc  as receiver of ADT and sender of ACK –


Now after adding documents, configure the channels and add the identifiers in trading partner profiles. Again it is a common task so I am not showing it up here.

Now we will configure the agreements. First of all configure two agreements with MarketInc, each for ADT (Inbound) and ACK (Outbound). Then similarly configure two agreements with RetailInc, each for ADT (Outbound) and ACK (Inbound).


Once agreements are created, just save, validate and deploy those. Now you are ready to test your configuration.

To start and test the message flow, drop an ADT_A01 message into external listening channel directory of OracleServices. Once it gets removed from there just go to Oracle B2B reports and verify that –
  1. Incoming ADT from MarketInc has been processed successfully
  2. An ACK for incoming ADT has been posted back to MarketInc
  3. The same ADT has been passed to RetailInc
Note :- If RetailInc is also configured then you may see an ACK back from RetailInc as well.
 

So now you are done with implementation. 


How exactly it works: It just tries to identify the intended recipient (ToTP) for the incoming message. If it is not the host trading partner for which the message has been sent then it just tries to find an outbound agreement with intended recipient and if found one, then it posts the same message to that TP. 

You may download the configuration which I created for this example implementation, from here.  Make sure to change the channel end-point configuration if you are using this configuration. You can also download the sample ADT message which I used to start and test the message flow, from here.

Now go ahead and experiment more with it. If you have any queries related to this implementation, please feel free to post them in OTN Oracle B2B forum

Thursday Nov 25, 2010

Roles in Oracle B2B

[Read More]

Monday Nov 08, 2010

Document Provisioning - way towards Onboarding Trading partner?

[Read More]

Thursday Sep 23, 2010

B2B Sessions i attended in OOW

[Read More]

Friday Sep 17, 2010

B2B Session in OOW 2010

[Read More]

Monday Sep 06, 2010

Security in Trading partner Integration - OOW 2010

[Read More]

Tuesday Jun 29, 2010

OSB - B2B Integration - EDIFACT

Usecase 1: OSB to use B2B for translating the EDIFACT XML document to native using the translation webservice exposed by B2B .

 

B2B Configuration

 

Oracle B2B 11g PS2 release has exposed webservices to translate XML document to Native document. This service needs an outbound agreement in B2B configured with appropriate document  targeted for a specific trading partner.

 

For e.g FromTP - MarketInc,  and toTP -OracleServices ( these value has to be updated in OSB configuration - File-In ProxyService). From EDIFACT XML document, we can identify the document type and document revision.  These details used to identify the agreement in B2B.

 

B2B translation webservice can be used in two modes, one for only translation and another for translation and routing.

 

OSB-B2B integration sample are developed based on the B2B sample "b2b-003-EDIFACT" in OTN, which deals with the creation/management of B2B configuration in detail.

 

Path structure:

b2b_003_edifact_1.0.zip\SOASamples\b2b\b2b_003_edifact\artifacts\b2b\

b2b_003_MI_EDIFACT_ORDERS_CONTRL_v1.zip\AS2_M_O_EDIFACT_D3_CONTRL_Agr.zip

 

 
 
msgosb1.jpg
 
 

 

 
OSB Configuration

 

Steps to create OSB Configuration sample:

1.       Create a OSB Project with name OSB-B2B

2.       Create BusinessService with name B2BBusinessService to consume B2B TranslateService

URL http://<host:8001>/b2b/services/ TranslateService

 

 

3.       Create BusinessService with name File_Out

Property Name

Value

RequestType

text

Provider id

File

URI

file:///C:/temp/OSB/out

Suffix

.txt

 

4.       Create ProxyService with name local_Proxy with following properties

Property Name

Value

requestType

text

reponseType

text

Provider id

local

 

5.       Add Rout node for local_Proxy

6.       Add Service Callout to Rout node to wire OSB-B2B/File_Out

7.       Create ProxyService with name File_in  with following properties

Property Name

Value

fileMask

.xml

pollingInterval

5

Binding type

XML

postAction

delete

Provider id

 File

URI

file:///C:/temp/OSB/in

stageDir

C:\temp\OSB\stage

errorDir

C:\temp\OSB\error

 

8.       Add pipeline pair

9.       In request pipeline pair create following assign actions

Variable

XQuery Text

documentType 

$body//pf1:Element-0065/text()

version

xs:string($body/(@Version))

from

xs:string('MarketInc')

to

xs:string('OracleServices')

body1

<![CDATA[<b2b:TranslateRequest xmlns:b2b="http://xmlns.oracle.com/integration/b2b">

    <!--Optional:-->

    <b2b:from type="Name">{$from}</b2b:from>

    <!--Optional:-->

    <b2b:to type="Name">{$to}</b2b:to>

    <b2b:documentTypeName>{$documentType}</b2b:documentTypeName>

    <b2b:documentProtocolVersion>{$version}</b2b:documentProtocolVersion>

    <!--Optional:-->

    <b2b:action>anyType</b2b:action>

    <!--Optional:-->

    <b2b:encoding>utf-8</b2b:encoding>

    <b2b:payload>{$body/*}</b2b:payload>

</b2b:TranslateRequest>]]>

body

&lt;soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

{$body1}

&lt;/soap:Body>

 

10.    In response pipeline pair create following assign actions

Property Name

Value

body1

fn:data($body/*)

 

11.    In response pipeline pair create following sevice callout with Service reference "B2B-OSB/local proxy"

Property Name

Value

Request

$body1

response

response

 

clip_image003.jpg

 

 

12.       Add route node for File_in  with  Service reference "B2B-OSB/B2BBusinessService" and select operation "Translate"

 

 

 

osb4.jpg
 

 

 

 

13.       File_in ProxyService

 

 

 

osb5.jpg
 

 

 

 

 

14.       OSB project elements

 

 

 

osb6.jpg
 

 

 

 

Usecase 2: B2B webservice used for translation and routing as well.

 

For translation and routing, OSB is required to create the BusinessService using the URL.

 

http://<host:port>/b2b/services/OutboundService

 

Useful Links:

OTN B2B website

B2B Samples in OTN

  

Same approach can be used for B2B-OSB integration for a healthcare scenario. This is one way of integrating B2B translation service with OSB. Refer for more details in OTN B2B website .

[Read More]

B2B Import : replace flag

[Read More]

Friday Jun 25, 2010

Side by Side versioning in Oracle B2B

[Read More]

Tuesday Jun 08, 2010

How Archive work in Oracle B2B 11g.

[Read More]

Friday May 28, 2010

Integrating OSB - B2B for a healthcare scenario

[Read More]

Thursday May 27, 2010

B2B - OSB Action Series

[Read More]

Thursday May 20, 2010

Commandline Purge in AS11

AS11 - B2B offering consists of numerous features that have been made available via commandline approach. Most of these are supplement to the already available User Interface based approach. One such is purging of runtime data.

The commandline purge option enables the users to purge the runtime data, based on various criteria. This is an ANT based command, provides the flexibility to selectively set the criteria to purge the runtime data.

Providing the command line option also enables the administrator to purge in bulk, without visiting the B2B UI, which can also be used for automation purpose

By default archival is turned on for purge activity. As a pre-requisite, the respective folder needs to be configured in database with the proper permission. When no filename is provided for archived data, the sysdate will be considered for filename.

Below are the various options to purge the runtime data


Option

ANT option

 

Message state

-Dmsgstate

 

Date range

-Dfromdate,  -Dtodate

Format : dd/mm/yyyy hh:mm AM/PM

Trading partner

-Dtp

 

Direction

-Ddirection

 

Message Type

-Dmsgtype

 

Agreement Name

-Dagreement

 

IdType/ value

-Didtype,  -Didvalue

 

Archive

-Darchive

True/false

By default true

Archive file name

-Darchivename

File name (optional), will be used when archive is set to true.


Note: When using -Darchivename the value must be a unique file name. An existing file name used with -Darchivename throws an exception


Below are the few of ant commands and various options.

 

Purge based on date range and message state:


ant -f ant-b2b-util.xml b2bpurge -Dmode=RT -Dfromdate="19/12/2009 1:04 AM" -Dtodate="19/12/2009 1:05 AM" -Dmsgstate=MSG_COMPLETE -Darchivename="filename.dmp"

 


Purge based on direction:

ant -f ant-b2b-util.xml b2bpurge -Dmode=RT -Ddirection="OUTBOUND"



Purge based on agreement Name:

ant -f ant-b2b-util.xml b2bpurge -Dmode=RT -Dagreement="agreement_name"


Purge based on Trading partner Name:


ant -f ant-b2b-util.xml b2bpurge -Dmode=RT -Dtp=GlobalChips


Purge based on Message State:


ant -f ant-b2b-util.xml b2bpurge -Dmode=RT -Dmsgstate="MSG_COMPLETE"



ant -f ant-b2b-util.xml b2bpurge -Dmode=RT -Ddirection="OUTBOUND" -Dmsgstate="MSG_COMPLETE"




[Read More]
About

To Discover and discuss the capability of B2B in the world of Trading Partner Integration. This blog is primarily intended to share thoughts on Oracle B2B Product and to share best practices in performance, scalability and various topologies.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today