3 Creating Guideline Files

This chapter describes the process of creating document guideline files by using Oracle B2B Document Editor.

Creating guideline files is the first step in the Oracle B2B process flow. The Oracle B2B Document Editor is a guideline creation and implementation application for defining and managing custom document definitions for Oracle B2B transactions.

This chapter includes the following sections:

For complete documentation on the document editor, see the Oracle B2B Document Editor Help menu.

3.1 Introduction to Oracle B2B Document Editor

Oracle B2B Document Editor is a guideline creation and implementation application for business-to-business (B2B) electronic commerce (e-commerce). Use the document editor to simplify developing, migrating, testing, distributing, and printing your electronic business (e-business) guideline documents. You can create new guideline documents or use the document editor's comprehensive library of standards as templates.

Using an existing standard as a template, you can create new guidelines by changing the attributes of underlying segments, elements, and codes. You can also create a guideline file from a data file.

Figure 3-1 shows the types of available document guidelines: delimited flat file, EDI, HL7 2.x, HL7v3, NCPDP, ParserSchema, positional flat file (which includes SAP iDocs), RosettaNet, and XMLSchema.

Figure 3-1 Document Guidelines Available in Oracle B2B Document Editor

Description of Figure 3-1 follows
Description of "Figure 3-1 Document Guidelines Available in Oracle B2B Document Editor"

In addition to using the RosettaNet document guide lines in the document editor, you can also download standard DTD files from the RosettaNet Web site.

After creating a custom guideline file, use the Oracle B2B interface to include the documents in the document definition, as shown in Figure 3-2. See Creating Document Definitions, for more information about this step.

Figure 3-2 Importing XSD and ECS File Created in Oracle B2B Document Editor

Description of Figure 3-2 follows
Description of "Figure 3-2 Importing XSD and ECS File Created in Oracle B2B Document Editor"

In Figure 3-2, EDIFACT_D98A_ORDERS.xsd and EDIFACT_D98A_ORDERS.ecs are imported to create the document definition. The ECS file is required in B2B for translating and validating documents. The XSD is optional in B2B; however, it provides an easy reference to the document schema when modeling a SOA composite for sending and receiving the document.

Note:

The MapBuilder component of Oracle Document Editor is not certified or supported.

3.2 Installing Oracle B2B Document Editor

Oracle B2B Document Editor can be obtained by product CD or downloaded from the Oracle Technology Network Software Downloads page (under Oracle SOA Suite 11g Installations > Prerequisites & Recommended Install Process > Recommended Components).

Follow this link to download it:

http://www.oracle.com/technetwork/middleware/soasuite/downloads/downloads-085394.html

To install the Oracle Document Editor, extract the downloaded files onto your disk drive, and run Install.exe. Several installation scripts guide you through the process of installing each of the Oracle Document Editor components.

Oracle B2B Document Editor runs on Microsoft Windows only (Win 2000, WinXP, Vista 32-bit and 64-bit, Windows Server 2003, and Windows 7 32-bit and 64-bit), and requires the Microsoft .NET framework (installed automatically from the CD) for full support of W3C XML Schema guidelines.

Note:

When using Microsoft Vista, do not install Oracle Document Editor in the program folder, for which admin privilege is needed.

Note:

When installing the Document Editor on Windows 7 64-bit, there is a potential known issue that can prevent you from being able to install any of the Oracle B2B Standards. As a result, the Document Editor install, but each standard fails.

The fix for this Known Issue can be found at:

http://support.microsoft.com/kb/910816

Complete usage instructions are available from the Oracle B2B Document Editor Help menu by searching on installation and displaying the Preparation topic. A list of new features in this release of the document editor is also provided.

3.3 Creating Guideline Files: EDIFACT D98 Example

This example describes how to create the guideline files—the ECS and XSD files— required to send an EDIFACT D98A purchase order, and how to generate and validate test data files based on the D98A–ORDERS guideline.

To create the EDIFACT transaction documents for this scenario, do the following:

3.3.1 Create the ECS File

Using an existing EDIFACT guideline (standard) as a template, create a purchase order guideline file called orders.ecs.

  1. Open Oracle B2B Document Editor.

  2. Click New Document and then EDI, as shown in Figure 3-3.

    Figure 3-3 Creating a New Document in Oracle Document Editor

    Description of Figure 3-3 follows
    Description of "Figure 3-3 Creating a New Document in Oracle Document Editor"
  3. Expand EDIFACT and D98A.

  4. Select ORDERS - Purchase order message, as shown in Figure 3-4, and click Next.

    Figure 3-4 Creating a New Document: Selecting a Guideline

    Description of Figure 3-4 follows
    Description of "Figure 3-4 Creating a New Document: Selecting a Guideline"
  5. Ensure that Insert Envelope Segments is not selected, as shown in Figure 3-5, and click Finish.

    Figure 3-5 Creating a New Document: Envelope Segments

    Description of Figure 3-5 follows
    Description of "Figure 3-5 Creating a New Document: Envelope Segments"

    Oracle B2B Document Editor is preseeded with all versions of the interchange (envelope). Oracle B2B handles the envelop based on the settings.

    To override the default preseeded envelope information, create a separate ECS file with only the required envelope information (without the transaction details) and then upload it using the envelope override option available in the document version.

  6. (Optional) Edit the segment-level details.

    No edits are needed for this scenario, as shown in Figure 3-6.

    Figure 3-6 Creating a New Document: Segment-Level Details

    Description of Figure 3-6 follows
    Description of "Figure 3-6 Creating a New Document: Segment-Level Details"
  7. From File, select Save.

  8. Accept the default directory and enter orders.ecs for the file name.

    By default, the ECS file is saved to My Documents\Oracle\Oracle B2B\ Guidelines.

3.3.2 Create the XSD File

Using the guideline file in its internal format (the ECS file), create an XML schema definition file (the XSD format) to use with Oracle B2B.

  1. From File, select Open.

  2. Select orders.ecs and click Open.

  3. From File, select Export.

  4. In the Export Wizard, select Oracle B2B 2.0 from the list of export types and click Next.

    Use the Oracle B2B 2.0 export type to provide a namespace of your choice, as in urn:oracle:b2b:EDIFACT/D98A/ORDERS for this example. (Use the Oracle B2B option to have a fixed namespace provided for you.)

  5. In the Export Destination dialog:

    • Accept the default directory.

    • Select Save guideline before exporting.

    • Select Show advanced options.

    • Click Next.

    The XSD file is saved with the ECS file in My Documents\Oracle\Oracle B2B\Guidelines.

  6. In the XSD Namespace Options dialog, do the following and click Next.

    • Select Custom namespace.

    • Provide a namespace (in this example, urn:oracle:b2b:EDIFACT/D98A/ORDERS).

  7. In the Templates Configuration dialog, click Next.

    Note:

    Do not modify any information in this dialog. Any changes will cause the CONTRL and 997 generation to fail because B2B relies on the default tags to extract the original control numbers.
  8. In the Conversion Options dialog:

    • Check the Suppress Enumeration in XSD option. This is recommended because code lists are in the ECS file. Suppressing enumeration reduces the XSD size considerably.

    • Check the Use this export module instead of default during XData generation option.

    • Click Next.
  9. In the Document Conversion Options dialog, accept the default, Allow to use SegmentCount macro, and click Next.

    The SegmentCount macro counts the number of segments. The data type of the XSD element is changed from numeric to string to enable the count.

  10. Ensure that the Launch Oracle B2B option is not selected (it is not needed in this scenario) and click Next.

    If you want to start Oracle B2B, enter the URL for your B2B interface (http://host_name:port/b2b).

  11. In the Macro Nodes dialog, click Next.

    No macros are needed for any of the nodes in this scenario.

    If you see the message Some characters were replaced in XSD names because they are not allowed, click OK.

  12. Click Finish.

    The orders.xsd file is created in Oracle B2B 2.0 format.

3.3.3 Generate Data Using the ECS File

Using the Oracle B2B Document Editor Data Generator, create a test data file based on the guideline.

  1. Click Data Generator.

  2. Select New Test Case and click Next.

  3. Click Generate and click Next.

    This step generates new data using the specified data dictionaries.

  4. Select From a guideline file, select ORDERS.ecs, and click Next.

  5. Select Select Envelope Segments from the Standards Database and click Next.

  6. Select the Syntax 3 envelope segment and click Next.

  7. Select Use directly from the Standards Database and click Next.

    The envelope segments are not incorporated in the guideline file.

  8. Select Mandatory + Percentage of optional data and move the slider to indicate the percentage.

  9. Select User Option and click Next.

  10. Select Any size and click Next.

  11. Select Do not reset and click Next.

  12. Set the repeat count options, depending on how many messages you want generated.

  13. Select any data dictionaries you want to use.

  14. Accept the default delimiters and click Next.

  15. Click Output Data file name, enter C:\D98A_ORDERS.dat and click Next.

    The DAT file opens, as shown in Figure 3-7.

  16. Save and close the file.

3.3.4 Analyze the Data

Using the Oracle B2B Document Editor Analyzer, validate the data file against the orders.ecs guideline file, and test the data file against the standard to check for required segments or elements that may be missing.

  1. Click Analyzer.

  2. Browse for D98A_orders.dat and click Next.

  3. Ensure that Show Advanced Options is selected, and click Next.

  4. In the Clean Up Data File dialog, click Next.

    No preprocessing is needed in this scenario.

  5. In the Data Structure dialog, click Next.

    The entire document is validated by default.

  6. Select the guideline file (ECS file) against which to check the data. Do the following and click Next.

    • Select From a guideline file.

    • Select orders.ecs.

  7. Select Select Envelope Segments from the Standards Database and click Next.

    The selected guideline file (ECS file) does not contain envelope segments.

  8. Select the Syntax 3 envelope segment, and click Next.

  9. Select Use directly from the Standards Database and click Next.

    The envelope segments are not incorporated in the guideline file.

  10. In the Analyzer Mode and Outputs dialog, accept the default settings, set Generate XData (XML) to Always and click Next.

    The results, including any error messages, are displayed, as shown in Figure 3-8.

    Figure 3-8 Results from the Analyzer

    Description of Figure 3-8 follows
    Description of "Figure 3-8 Results from the Analyzer"

    To view the data in XML format, click the XML button in the upper right corner, as shown in .

    Use the View as XML and View as HTML options to view the data. Click the Save Data As button to export the XML report as an XML file.

    Note:

    When you need to override the Envelope parameters using internal properties, you need to specify the overriding values as a part of <Lookup> as well as the <Property> tag.

    For example:

    <Internal-Properties>
    <Data-Structure Name="Interchange">
    <Lookup Name="InterchangeReceiverID">GlobalOverride </Lookup>
    <Property Name="InterchangeReceiverID">GlobalOverride </Property>
     
    ...
     
    </Data-Structure>
    </Internal-Properties>