Sei sulla pagina 1di 33

EDI Transaction Basics Using Oracle B2B, BPEL and EBS

Bridging the Gap


Jimmy A. Chino

Who is NOW Foods?


Look for us in your local health food store www.nowfoods.com NOW Foods is one of the top-selling brands in health foods stores, an award-winning manufacturer, a respected advocate of the natural product industry, and a leader in the fields The NOW facility in Bloomingdale, IL of nutritional science and methods development.

Here are just a few awards recent Our website is

Application Servers
SOA Suite (for BPEL processes)
BPEL processes will move and manipulate payload in-between B2B and EBS

Oracle Application Server (for B2B)


B2B will translate and transport EDI or custom electronic documents

Basic Architecture
Trading partner FTP server or VAN B2B Server BPEL Server Database

Some B2B server components can exist on a DMZ server as well

Tools
B2B Document Editor
My Oracle Support Article ID 412554.1 give you instruction on where to get it and download it For EDI transactions, the tool defines the document protocol for validation purposes in a .ecs file A .ecs file can be exported to a .xsd file through this tool to enable EDI to XML translation BPEL uses XML payload for processing

Tools
JDeveloper
Is used to design BPEL processes B2B and EBS adapters are defined within the BPEL process flow The Application server version you are deploying processes to should be the same version as JDeveloper

Tools
SQL Plus or Toad for Oracle
Custom procedures can be written to interact with BPEL processes through the use of BPEL database adapters

For Testing FileZilla Server


Test to see if Set up a user Use a shared Free download from your site is login to simulate folder on your Mozilla working in IE by a trading partner workstation as entering the Easy to set updirectory assigned user the root address name and of your test FTP Excellent for testing ftp://localhost password site and getting familiar with how B2B works Apply permissions applicable to your scenario to the root folder

B2B, and EBS Queues


B2B
IP_QTAB: B2B database queue table IP_IN_QUEUE message: inbound B2B messages IP_OUT_QUEUE message: outbound B2B
messages

EBS (Database)
WF_BPEL_QTAB Useful for processing EBS business events

B2B Document Editor Tool


In this case, a 4010 850 Purchase Export the .ecs as an .ecs document Order doc is chosen. Find the document definition in the editor standards database.B2B OracleAS Integration definition .xsd

Application Server Integration Setup


Define the protocol Setup the trading partner Define the agreement Deploy the agreement

Document Protocol Setup


Name the business action and define the revision Create a protocol
Override default delimiters if necessary

Finished!

Trading Partner Creation

Document Protocol Assignment and Delivery Channel Setup


Assign document protocol to the trading partner
Define the delivery channel for outbound documents

Document Exchange and FTP Server Setup

Additional documents can be added In order to receive documents via FTP, a separate delivery channel will need to be defined at the host trading partner

Adding a 997 Acknowledgement


Inbound document acknowledgement flag and B2B flag must be set for B2B to handle sending acknowledgements automatically

The remote trading partner will need the 997 document definition added to their capabilities setup

Host Trading Partner Setup


Locate the host trading partner (You) Navigate to Capabilities Since we are using an FTP transport and X12 protocol, select EDI X12 over Generic Exchange Create a new communication capability Define the remote delivery channel Define host document exchange values Define remote FTP server

Done!

Agreement Creation and Deployment


After clicking the Deploy Select partner Validate the button a couple Select Select protocol 850 of times your agreement process Select Trading deployment is partner now active
Choose the Add Select a 997 to host delivery Choose host trading channel the agreement DC partner id

Assign a Create and configuration agreement name name and an agreement


id

Using JDeveloper to Design a BPEL Process


Preferred way to develop each BPEL process Create adapters first Link the adapters to define the process

JDeveloper BPEL AQ Adapter Configuration


Define the Define Name the the adapter connection to Create an In Advanced this case we will Create an empty BPEL Process Project IP_OUT_QUEUE to your B2B Application Queue pickAdapter a document up offup pick messages Server of theIntegration B2B from queue The id needs to be placed here in Remember Your adapter the Select the root Import the .xsd file order to determine document configuration routing Add thenode .xsd file we of the which adapter the is id complete from your exported from .ecs XML schema document gets inbound B2B configuration we routed to process? created earlier. This needs to be the same file

JDevloper BPEL Database Adapters

Drag The the primary Link In the the tables case of an key for this Choose the header table database table is Define the primary key inbound purchase Name Drag the another adapter database Name the database adapter orig_sys_document_ref for the lines table too order, the order adapter to the right swim adapter This time we are Call the custom icon to the import tables are lane Select your predefined A custom procedure Oracle performing an insert on a stored procedure In the Define casethe of these connection two tables, right swim being written to database validates connection the trading table there is (same a one to as many before) relationship lane partner and provides data on orig_sys_document_ref necessary for the Oracle Order Import function

Linking Adapters with BPEL


Drag in a Other services XPath Within the Transform Link the like XML Transform can be expressions added activity, define the elements source in activity ine-mail will need to Data can be and target variables the Assign between the Name the activity notifications be written when in assigned to the Only an input variable activity Name the invoke activity validation a process order is to Name the Mapper File and XML variable isnew needed for table Auto-create a variable invocation faulted. extract A input basic XML clickto the Create Mapping Create both the and by overwriting the update hold the incoming nd and the 2 flow will data look to like be icon output variables placeholders payload Assign this. copied into defined earlier. Placeholders need to be assigned to XML In this itcreate is the activity scenario, Check the the XML nodes that will be overwritten by an data assign inbound 850 and our instance checkbox input Within the mapping tool, literal values can be activity. In this case, the Various functions can be used to default Oracle interface table XSLT functions like for-each can be used to loop data. Switch Link the to process Receive Drag activities in activity a Receive with in the the activity Component B2B Adapter parameters Pallet The assignments can be expressions or regular assigned for constants. Drag two Invoke activities into the process orig_sys_document_ref will be be generated information. In this case, a can date time function Link the processes String functions like concat used to join for the Attributes can be directly mapped assignments by the result of the validation procedure is used. information to create unique information on the fly. Create a copy operation validation Drag an Assign activity between the first data later in the process. procedure receive and the first invoke

Deploying a BPEL Process


Running the Apache Ant process built into the BPEL process will deploy your process to the SOA server defined in your The BPEL JAR file is now deployed to your build.properties SOA server file

Lets see it work!


A file is The inserted order is generated at the found in the interface FTP server

A BPEL process polling the IP_OUT_QUEUE runs


The a 997 is is sent to the The document is received B2Ban and 997 Order Import runs to by create order in Order placed in the FTP server receiving Management
directory

Outbound Documents
Workflow business events are a great way
to push XML payload out to the BPEL server Generic XML can be mapped to .xsd files generated from the B2B document editor tool

Oracle PL/SQL Procedure


A custom With the In the procedure wf_event procedure, is written to a function, xml data is extract business appended to invoice event is a CLOB information raised to variable publish XML to the business event queue

Assign the procedure in EBS to an Executable and Create a Concurrent Request


Once The ,and the Define the Define the assigned request parameters concurrent executable in tofor can a report be the program, the System scheduled request procedure Administrator group,. or can be responsibility run as soon as possible

Workflow Business Event


Define the Create business the event Complete event thethat setup you are and that is writing to have in all you your to do on the procedure workflow side

Mapping Generic XML to B2B


An Assign can The activity B2BUSER The In an B2B Assign adapter write data to the Within The Along with the 810 is the recipient The XSLT map is Activity, an Enqueue the header payload IP_OUT_QUEUE JDeveloper and and an 810 variable being takes simple ora:processXSLT type adapter previously mentioned after is written creating to .xsd file is a created, it is uniform payload function decides new empty BPEL chosen which necessary to create a In this scenario, EDI and maps data which XSLT file to process, a was generated header message to Interchange to thethe proper process with custom .xsd can from B2B be able to route the ID:TESTPARTNER XML based on anEditor XML be created to Document document internally will bepayload passed to the representation attribute reflect the tool once it reaches B2B TO_PARTY parameter An Oracle applications business event of an EDI outbound XML adapter will poll the WF_BPEL_QTAB table element that will originate to receive the XML payload from the business The module browser is handy for finding and event. An object definition can be chosen The Our adapter custom isschema pointed is toselected the database to validate instance selecting business events XML flowing into the adapter

Adding 810 to an Agreement in B2B

Validate

the 810 business action to the Agreement AddAdd an 810 operational capability to the Test Partner

Outbound Processing
Concurrent process runs

The BPEL process dequeues the message

B2B processes the file and creates it in the target The XML payload enqueued to the FTPis directory WF_BPEL_QTAB table in the EBS database

Questions?

Potrebbero piacerti anche