10 Accepting B2B Orders

This chapter describes how Oracle SOA Suite addresses the business challenge of accepting orders that follow B2B standards such as the Electronic Data Interchange (EDI) document protocol. Overviews of how key SOA composite application components address this challenge are provided, including Oracle B2B, Oracle Managed File Transfer (MFT), and Oracle Service Bus.

This chapter includes the following sections:

10.1 Business Challenge

Company X has a requirement for the order processing system to accept EDI XML document orders sent through several different input channels.

10.2 Business Solution

To address this business challenge, Company X designs a business solution that uses the components described in Table 10-1.

Table 10-1 Components That Provide the Business Solution

Component How This Component Addresses The Business Challenge Component Description

Oracle B2B

The Oracle B2B Console is used to build a document flow that accepts an EDI XML order from a remote trading partner.

Oracle B2B enables you to securely and reliably exchange documents between businesses (for example, retailer, supplier, and manufacturer). B2B e-commerce represents mature business documents, classic business processes, and industry-specific messaging services. B2B e-commerce requires an architecture to manage the complete end-to-end business process. Oracle B2B provides an architecture enabling a unified business process platform, end-to-end instance tracking, visibility, auditing, process intelligence, governance, and security.

Oracle MFT

Oracle MFT is integrated with Oracle B2B, which enables an EDI XML order to be sent by the embedded FTP server to Oracle B2B.

See Table 9-1 for a description of Oracle MFT.

Oracle Service Bus

Oracle Service Bus is integrated with Oracle B2B. This enables Oracle Service Bus to read orders from the queue and transform them from EDI XML format into canonical order messages for submittal to the ProcessOrder composite.

See Table 3-1 for a description of Oracle Service Bus.

Figure 10-1 provides an overview of how this business solution is implemented.

Subsequent sections of this chapter provide more specific details about how the components in Table 10-1 are used to address the EDI XML document order business challenge.

10.2.1 Creating Trading Partners and Trading Partner Agreements with Oracle B2B

To address the business challenge of the order processing system being able to accept orders in EDI XML format, Company X uses Oracle B2B. Oracle B2B enables you to create trading partner agreements between Company X and any trading partners that submit orders in EDI XML format. A trading partner agreement consists of two trading partners: the host trading partner and remote trading partner. The trading partner agreement defines the terms that enable these two trading partners, one acting as the initiator and the other acting as the responder, to exchange business documents.

Company X performs the following administrative tasks in the Oracle B2B Console:

  • Sets the queueing delivery method to JMS.

  • Creates a document type named EDI_XML_850.

  • Creates a document definition named X12_4010_850_XML_Def for an inbound EDI XML 850 file and a creates a root node name. The document definition defines the transaction structure processed at runtime and includes key identification configurations. When the B2B Gateway finds an XML file with this root node, it matches this document definition, which leads it to the trading partner agreement.

  • Imports a WSDL file.

  • Creates a web service listening channel.

Company X then creates the following trading partner and trading partner agreement to accept new XML document transactions from the trading partner. A trading partner agreement is similar to a legal contract that specifies which document is traded between which partners, in which direction, and in which protocol, including security parameters such as digital signatures, message encryption, and whether or not an acknowledgement is expected.

  • Creates a trading partner named Partner1 and selects the X12_4010_850_XML_Def document definition created previously. This informs Oracle B2B that Partner1 is allowed to trade with the host trading partner Company X (referred to as MyCompany in the Oracle B2B Console) using this document definition.

  • Creates a trading partner agreement that associates Partner1 with the host trading partner (Company X). The agreement specifies the document, message direction, delivery channel, and other settings.

    In Figure 10-2, the document definition created previously along with the direction (remote Partner1 sending an inbound EDI XML order to the host Company X, and referred to as MyCompany in the Oracle B2B Console) is selected.

    Figure 10-2 Document Definition and Direction Selection

    Description of Figure 10-2 follows
    Description of "Figure 10-2 Document Definition and Direction Selection"

After deployment, Company X tests the configuration by submitting an XML payload to the web service listening channel. The Oracle B2B Console Reports tab shown in Figure 10-3 provides details.

Navigating further into the Details column link shows that the message was written to the JMS queue jms/b2b/B2B_IN_QUEUE. Figure 10-4 provides details.

10.2.2 Integrating an Oracle MFT Target with Oracle B2B

Company X also has a requirement to accept EDI XML orders sent by FTP servers. Company X configures Oracle B2B to work with Oracle MFT, which was described in Managing File Transfers. This enables Partner1 to send EDI XML orders to Company X through the following channels:

  • Web services (as previously described)

  • FTP servers using Oracle MFT

Company X first configures Oracle MFT with a connection to the Oracle B2B server on the Administration tab of the Oracle Managed File Transfer Console. Figure 10-5 provides details.

Figure 10-5 Oracle MFT Configuration to the Oracle B2B Server

Description of Figure 10-5 follows
Description of "Figure 10-5 Oracle MFT Configuration to the Oracle B2B Server"

Company X then creates a target named B2B_Orders of type B2B. The target defines the destination of files. The domain alias created on the Administration tab is selected. Figure 10-6 provides details.

A transfer associates a source with one or more targets. Company X creates a new transfer named Orders2B2BTransfer, then configures it as follows:

  • Selects the existing OrdersFTPEmbeddedSource source created in Creating Transfers, Sources, and Targets. The source defines the origin of files. OrdersFTPEmbeddedSource is configured to transfer files in the /orders directory using the FTP embedded server.

  • Selects the B2B_Orders target.

  • Enters EDI_XML_850 as the filtering pattern.

  • Selects Inline as the delivery method.

  • Enters 1000000 in the Max Inline Size (bytes) field.

Figure 10-7 provides details.

Figure 10-7 Oracle MFT Transfer with Transfer, Source, and Target Defined

Description of Figure 10-7 follows
Description of "Figure 10-7 Oracle MFT Transfer with Transfer, Source, and Target Defined"

After deployment and the placement of an EDI XML file that adheres to the pattern of EDI_XML_850 in the /orders directory, the Reports page in Oracle B2B Console shows that the message was delivered.

10.2.3 Integrating Oracle Service Bus with Oracle B2B

Company X creates an Oracle Service Bus project named B2B_SB_ReceiveOrder in Oracle JDeveloper to integrate with Oracle B2B. Company X's overall intent is for an Oracle Service Bus project to read messages from the queue and transform them from EDI XML into canonical order messages for submittal to the ProcessOrder composite created in Creating an Order Processing System.

The Oracle Service Bus project is created within the existing Oracle Service Bus application created in Registering SOA Composite Applications with Oracle Service Bus. This project retrieves Oracle B2B messages from the JMS queue, transforms them to canonical XML format, and writes them to a file. Figure 10-8 provides details. Once implemented, Company X extends the Oracle Service Bus process to call the ValidatePS process order proxy service created in Registering SOA Composite Applications with Oracle Service Bus.

Figure 10-8 B2B_SB_ReceiveOrder Project in Oracle Service Bus Application

Description of Figure 10-8 follows
Description of "Figure 10-8 B2B_SB_ReceiveOrder Project in Oracle Service Bus Application"

The components in the project perform the following tasks:

  • JMSReceiveOrder_ProxyService.proxy: Retrieves Oracle B2B messages (orders) from the B2B_IN_QUEUE.JMS queue. The JMS URL port points to the SOA server on which Oracle B2B is running.

  • MapEDI850ToCanonicalOrder.pipeline: Transforms Oracle B2B messages to canonical order XML format.

  • WriteCanonicalToFile.bix: Writes the canonical order XML format to a file in the /tmp/b2b/osbfiles directory.

After deployment, the orders are retrieved through the web service and Oracle MFT channels, transformed, and written to the directory. The Message Reports section in Oracle Enterprise Manager Fusion Middleware Control shows that the messages were processed by Oracle Service Bus. Figure 10-9 provides details.

Figure 10-9 Message Report Details

Description of Figure 10-9 follows
Description of "Figure 10-9 Message Report Details"

10.2.4 Integrating the ProcessOrder Composite with Oracle B2B

Company X further integrates Oracle B2B with the ProcessOrder composite created in Creating an Order Processing System.

Company X performs the following tasks and tests to ensure that Oracle B2B invokes the ProcessOrder composite to receive and process orders.

  • Edits the MapEDI850ToCanonicalOrder pipeline and changes the route node destination business service to the ProcessBS business service created in Registering the ProcessOrder Composite as a Business Service.

  • Redeploys and tests the web service and Oracle MFT channels.

  • Tracks the order in the Oracle B2B Console Reports tab and the Oracle Service Bus Message Reports page in Oracle Enterprise Manager Fusion Middleware Control.

  • Checks the ProcessOrder composite business flow instance in Oracle Enterprise Manager Fusion Middleware Control to verify that the order was received and processed successfully.

10.3 Related Documentation

Table 10-2 provides references to documentation that more specifically describes the components and features described in this chapter.

Table 10-2 Related Documentation

For Information About... See...

Understanding Oracle B2B

Introduction to Oracle B2B in Using Oracle B2B

Creating a trading partner and a trading partner agreement in Oracle B2B

Configuring Trading Partners in Using Oracle B2B

Creating and Deploying Trading Partner Agreements in Using Oracle B2B

Creating Oracle MFT transfers, targets, and sources

Designing Artifacts: Transfers, Sources, and Targets in Using Oracle Managed File Transfer

Adding a pipeline with Oracle Service Bus

Working with Oracle Service Bus Pipelines in Developing Services with Oracle Service Bus

Creating a proxy with Oracle Service Bus

Creating and Configuring Proxy Services in Developing Services with Oracle Service Bus

Transforming data with Oracle Service Bus

Transforming Data in Developing Services with Oracle Service Bus