Thursday 19 February 2015

Oracle Document Editor - Defining a custom message (Part 1 of 3)

Oracle Document Editor is an application used for creating and testing document definitions for Oracle B2B.

The document definition (ECS) file is required in B2B for translating and validating documents.

With Document Editor you are able to create new guideline documents or use a template from the comprehensive library of standards available for download. You can download Document Editor and the standard definitions available here.

The available document guideline templates include EDI, HL7, positional flat file (which includes some SAP iDocs), XMLSchema and so on, as seen below.



Thanks to the countless templates available you can easily and quickly create a message definition (ECS) and respective XSD to import to B2B. Making the necessary changes if needed.

Below is an example of a message definition from the template library.



However, specially with Positional Flat File (PFF) messages, you might have to create a custom definition.

In this post I will go through the steps needed to create a custom PFF document definition in Document Editor. This post will be divided in 3 parts, in the first part I will focus on Message Segments', afterwards I'll cover the Field's types and properties, finalizing with testing and XSD generation.

Let's start by creating an empty definition.



The first step will be to create the Message segment, which constitutes the root node.



After defining the root you are able to add two type of child nodes: Segment and Group (of segments).


 I will start by creating the first Segment of the message.


And defining it's properties.


As can be seen above you can define the level of requirement and the number of usages of Segments and Groups. There are various possibilities as for example Mandatory & Must use or Optional & Used.

In the picture below I am creating a Group



And defining it as Optional with the possibility of appearing numerous times.


In the next part I will focus on a Segment's child nodes.

Friday 6 February 2015

Oracle B2B 12c Positional Flat File and Charset Configuration

Oracle B2B supports the processing of various protocols and types of messages, however, sometimes extra configurations are needed to support special cases. For each protocol type there is a charset file associated to it, containing the allowed characters.

In my case, we were receiving Position Flat File (PFF) messages with the German char “ß” in it, which is not part of the default PFF charset. Fortunately B2B is flexible enough to allow the modification of said charsets.

In this post I will tackle the two tasks needed to able to add this PFF document to Oracle B2B 12c, namely Generating the ECS parser schema and modifying, if needed, the default PFF charset on B2B.
Oracle Document Editor is an indispensable tool to create message definitions for Oracle B2B documents and will have an important part in both tasks.

First I will quickly describe how to generate the parser schema for your PFF document on Document Editor and add it to B2B and, afterwards, I will describe the steps required to modify the default PFF charset used by B2B.


  1. Generate ECS parser schema
When you define a PFF document you need to create a parser schema and add it to the XEngine.
To do that start by opening your message definition on Oracle Document Editor and navigate in the menu to Edit -> Generate Parser Schema and generate the parser as seen bellow.



If you receive more than one message per file and want to process them as one just remove the check from "First record in the guideline starts a new message".

Next navigate in your server’s folder structure to {Middleware_home}/soa/soa/thirdparty/edifecs/XEngine/config and:
  1. Add your parser ecs file in the “schema” folder;

  2. Edit the XERegistry.xml file and add an entry as shown below under “Positional flat parser schemas”



To conclude restart the SOA server.




  1. Modify the PFF charset

In case the PFF messages going through your B2B system use characters not included in the default charset, you will have to add them to the list of allowed characters. This is done by creating a custom charset for the specified Guideline Type (you can also specify the Standard and Version) which will override the default charset for the corresponding documents.
To accomplish this you will need to create a custom charset on Oracle Document Editor as follows:

  1. Open Oracle Document Editor and navigate in the menu to Tools -> Environment -> Character Set Registry as seen here bellow


  1. Duplicate or Create a charset, in this case I duplicated the Delimited Flat File CS as it had almost everything I needed and changed the Guideline Type combo box “Positional”

  2. Make the needed changes, as for example in the picture bellow


  1. Export your newly created charset.

Afterwards, navigate in your server’s folder structure and:
  1. Add your custom charset to {Middleware_home}/soa/soa/thirdparty/edifecs/XEngine/config/charsets

  2. Add an entry on {Middleware_home}/soa/soa/thirdparty/edifecs/Common/Modules/XEngine.dat as seen bellow


Finally, restart the SOA server.