Skip Headers
Oracle® Fusion Middleware User's Guide for Oracle B2B
11g Release 1 (11.1.1)

Part Number E10229-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

4 Creating Document Definitions

The second step in the Oracle B2B process flow, shown in Figure 4-1, is to create document definitions.

Figure 4-1 Oracle B2B Process Flow

Oracle B2B Process Flow
Description of "Figure 4-1 Oracle B2B Process Flow"

A document definition specifies the document protocol—the document protocol version and document type—that is used to validate the message. The document definition can be an ECS file, in the case of EDI and HL7 messages, or an XSD/DTD, in the case of XML messages.

The same document definition is used by both the host and remote trading partner in a transaction. It must adhere to the standards for document protocols, protocol versions, and document types. This is straightfoward when you use Oracle B2B Document Editor to create the document guideline files (Step 1 in Figure 4-1) and then the Oracle B2B interface to import those files when creating the document definition (Step 2 in Figure 4-1).

This chapter contains the following topics:

4.1 Introduction to Document Protocols

Figure 4-2 shows the document protocols supported in Oracle B2B. Using the Custom protocol and the many guideline documents in Oracle B2B Document Editor, you can define most protocols. When you add a new document protocol, it is always a Custom document.

Figure 4-2 Oracle B2B Document Protocols

Document protocols
Description of "Figure 4-2 Oracle B2B Document Protocols"

You can think of a document protocol as a hierarchy, as shown in Figure 4-3.

Figure 4-3 Document Hierarchy

Document hierarchy
Description of "Figure 4-3 Document Hierarchy"

A document protocol can consist of multiple document protocol versions. A document protocol version can consist of multiple document types. A document type can consist of multiple document definitions. Typically, you start with one document definition and customize it for different trading partners.

Figure 4-4 shows a document protocol hierarchy as it applies to EDI X12.

Figure 4-4 EDI X12 Document Hierarchy

Document protocol hierarchy with EDI X12 example
Description of "Figure 4-4 EDI X12 Document Hierarchy"

In the Oracle B2B interface, as you create a document definition, the document protocol hierarchy is reflected in the definition:

DocumentProtocol—Version—DocumentType—DocumentDefinitionName

Example 4-1 shows the hierarchy reflected in the definition for an EDI EDIFACT document.

Example 4-1 Document Definition Name for an EDI EDIFACT Document

Document protocol: EDI_EDIFACT

Document protocol version: D98A

Document type: ORDERS

Document definition: ORDERS_def

The resulting document definition is

EDI_EDIFACT-D98A-ORDERS-ORDERS-def

Example 4-2 shows examples of document definitions for a Health Care 7 admit/visit notification and an X12 version 4010 purchase order, respectively.

Example 4-2 Document Definition Names for HL7 and X12 Documents

HL7-2.3.1-ACK_A01-ACK_A01_Doc_Def

EDI_X12-4010-850-850def

As part of the document definition, you provide the document guideline files, which are typically created in Oracle B2B Document Editor. (For Custom documents, you cannot use Oracle B2B Document Editor.) If validation is enabled, then, at run time, the payload must conform to the document definition file type you use.

For more information on document protocols, see Chapter 7, "Using Document Protocols."

4.2 Creating Document Definitions

After using Oracle B2B Document Editor to create the transaction set files, use the Oracle B2B interface to create the document definition and import the transaction set files.

Note:

The document version, document type, and document definition are not editable after they are created. You must delete the specific document element (version, type, or definition) and create a new one. Updating the document elements after creation can lead to metadata inconsistency, metadata validation issues, and run-time errors.

To create a document definition:

  1. Click the Administration tab.

  2. Click the Document tab.

  3. Select one of the document protocols.

    Document protocols available in B2B
    Description of the illustration bb_docprot.gif

    To create a new Custom document with a name that you provide, for example, MyXML_Document, click the Document Protocols folder, click Add, and provide a protocol name. Do not use an existing document protocol name.

    Description of bb_custom.gif follows
    Description of the illustration bb_custom.gif

  4. Click New Version.

    (An EDI EDIFACT document is shown for illustration.)

    The Add icon is featured.
    Description of the illustration bb_doc_vers.gif

  5. Enter a version name, provide document version parameters as applicable, and click Save.

    The version is used for document identification and can be case sensitive and use a fixed syntax, depending on the protocol.

    Input the document version
    Description of the illustration b2b_doc_vers.gif

    For parameter descriptions, see the following:

  6. With the new version name selected, click New Type.

  7. Enter a document type name, provide document type parameters as applicable, and click Save.

    The version is used for document identification and can be case sensitive and use a fixed syntax, depending on the protocol.

    Input the document type name.
    Description of the illustration b2b_doc_type.gif

    For parameter descriptions, see the following:

  8. With the new document type name selected, click New Definition.

  9. Enter a document definition name and do the following:

    • Browse for an optional definition (XSD) file for any of the document protocols.

    • Browse for the required transaction set ECS file for the following protocols: EDI EDIFACT, EDI X12, HL7, and positional flat file.

    • Provide document type parameters as applicable.

    Input the document definition name.
    Description of the illustration b2b_docdefs2.gif

    For parameter descriptions, see the following:

  10. Click Save.

4.3 Deleting a Document Definition

To delete a document definition, first delete all agreements that use that document definition and then remove the supported document definitions from the host and all remote trading partners that reference the definition.