BEA Logo BEA 

WebLogic Integration Release 2.1 Service Pack 1

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WebLogic Integration Doc Home   |   DI Topics   |   Data Integration   |   Previous Topic   |   Next Topic   |   Contents   |   Index   |   View as PDF

Building Format Definitions

 

The following sections provide information on building format definitions using the data integration design-time component of WebLogic Integration (Format Builder):

You can build format definitions for binary data that will be translated to or from XML. Format definitions are the metadata used to parse or create binary data.

 


Understanding Data Formats

To understand how to use Format Builder, it helps to understand the following data formats: binary data, XML, MFL, DTD and Schema.

About Binary Data (Non-XML Data)

Because computers are based on the binary numbering system, applications often use a binary format to represent data. A file stored in binary format is computer-readable but not necessarily human-readable. Binary formats are used for executable programs and numeric data, and text formats are used for textual data. Many files contain a combination of binary and text formats. Such files are usually considered to be binary files even though they contain some data in a text format.

Unlike XML data, binary data is not self-describing. In other words, binary data does not provide a description of how the data is grouped, divided into fields, or arranged in a layout. Binary data is a sequence of bytes that can be interpreted as an integer, a string, or a picture, depending on the intent of the application that generates the sequence of bytes. In order for binary data to be understood by an application, the layout must be embedded within each application that uses this data. Binary data may also be embedded using different character sets. For example, character data on an IBM mainframe is usually encoded using the EBCDIC character set while data from a desktop computer is either ASCII or unicode.

You can use Format Builder to create a Message Format Language (MFL) file that describes the layout of the binary data. MFL is an XML language that includes elements to describe each field of data, as well as groupings of fields (groups), repetition, and aggregation. The hierarchy of a binary record, the layout of fields, and the grouping of fields and groups are expressed in an MFL document. This MFL document is used at run-time to translate the data to and from an XML document.

Listing 2-1 Example of Binary Data

1234;88844321;SUP:21Sprockley's Sprockets01/15/2000123 Main St.;
Austin;TX;75222;555 State St.;Austin;TX;75222;PO12345678;666123;150;
Red Sprocket;

About XML Documents

Extensible Markup Language, or XML, is a text format for exchanging data between different systems. It allows data to be described in a simple, standard, text-only format. In contrast to binary data, XML data embeds a description of the data within the data stream. Applications can share data more easily, since they are not dependent on the layout of the data being embedded within each application. Since the data is presented in a standard form, applications on disparate systems can interpret the data using XML parsing tools, instead of having to interpret data in proprietary binary formats.

Instances of XML documents contain character data and markup. The character data is referred to as content, while the markup provides hierarchy for that content. Markup is distinguished from text by angle brackets. Information in the space between the "<"and the">" is referred to as the tag that markup the content. Tags provide an indication of what the content is for, and a mechanism to describe parent-child relationships. Listing 2-2 shows an example of an XML document.

Listing 2-2 Example of XML Document

<?xml version="1.0"?>
<PurchaseRequest>
<PR_Number>1234</PR_Number>
<Supplier_ID>88844321</Supplier_ID>
<Supplier_Name>Sprockley&apos;s Sprockets</Supplier_Name>
<Requested_Delivery_Date>2000-01-15T00:00:00:000</Requested_Delivery_Date>
<Shipping_Address>
<Address>
<Street>123 Main St.</Street>
<City>Austin</City>
<State>TX</State>
<Zip>75222</Zip>
</Address>
</Shipping_Address>
</PurchaseRequest>

An XML document can conform to a content model. A content model allows metadata about XML documents to be communicated to an XML parser. XML documents are said to be valid if they conform to a content model. A content model describes the data that can exist in an instance of an XML document. A content model also describes a top-level entity, which is a sequence of subordinate entities. These subordinate entities are further described by their tag names and data content. The two standard formats for XML content models are XML Document Type Definition (DTD) and XML Schema. A Schema is an XML document that defines what can be in an XML document. A DTD also defines what content can exist in an XML document, but the Schema definition is more specific than the DTD, and provides much finer-grained control over the content that can exist in an XML document.

Listing 2-3 shows an example of a Document Type Definition.

Listing 2-3 Example DTD

<!ELEMENT PurchaseRequest (PR_Number,Supplier_ID,Supplier_Name?,Requested_Delivery_Date,Shipping_Address,Billing_Address,Payment_Terms,Purchase_Items)>
<!ELEMENT PR_Number (#PCDATA) >
<!ATTLIST PR_Number type CDATA #FIXED "nonNegativeInteger">
<!ELEMENT Supplier_ID (#PCDATA) >
<!ATTLIST Supplier_ID type CDATA #FIXED "nonNegativeInteger">
<!ELEMENT Supplier_Name (#PCDATA) >
<!ATTLIST Supplier_Name type CDATA #FIXED "string">
<!ELEMENT Requested_Delivery_Date (#PCDATA) >
<!ATTLIST Requested_Delivery_Date type CDATA #FIXED "timeInstant">
<!ELEMENT Shipping_Address (Address)>
<!ELEMENT Address (Street,City,State,Zip)>
<!ELEMENT Street (#PCDATA) >
<!ATTLIST Street type CDATA #FIXED "string">
<!ELEMENT City (#PCDATA) >
<!ATTLIST City type CDATA #FIXED "string">
<!ELEMENT State (#PCDATA) >
<!ATTLIST State type CDATA #FIXED "string">
<!ELEMENT Zip (#PCDATA) >
<!ATTLIST Zip type CDATA #FIXED "nonNegativeInteger">

Listing 2-4 shows an example of an XML Schema.

Listing 2-4 Example XML Schema

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<xsd:annotation>
<xsd:documentation>
This schema created for MFL MessageFormat PurchaseRequest.
</xsd:documentation>
</xsd:annotation>
<xsd:element name="PurchaseRequest">
<xsd:complexType content="elementOnly">
<xsd:sequence>
<xsd:element ref="PR_Number" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Supplier_ID" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Supplier_Name" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="Requested_Delivery_Date" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="Shipping_Address" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PR_Number" type="xsd:nonNegativeInteger"/>
<xsd:element name="Supplier_ID" type="xsd:nonNegativeInteger"/>
<xsd:element name="Supplier_Name" type="xsd:string"/>
<xsd:element name="Requested_Delivery_Date" type="xsd:timeInstant"/>
<xsd:element name="Shipping_Address">
<xsd:complexType content="elementOnly">
<xsd:sequence>
<xsd:element ref="Address" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

About MFL Documents

Message Format Language (MFL) is an XML language that describes the layout of binary data. This language includes elements to describe each field of data, as well as groupings of fields (groups), repetition, and aggregation. The hierarchy of a binary record, the layout of fields, and the grouping of fields and groups is expressed in an MFL document. MFL documents are created using Format Builder. These MFL documents are then used to perform run-time translation. MFL documents are created for you when you define and save definitions from within Format Builder.

The MFL documents you create using Format Builder can contain the following elements:

 


Analyzing the Data to be Translated

Before a message format can be created, the layout of the binary data must be understood. Legacy purchase order sample data and corresponding MFL and XML documents for a purchase order record are installed with WebLogic Integration. The sample purchase order illustrates how WebLogic Integration translates data from one format to another. For more information on this sample data, refer to Running the Purchase Order Sample.

The key to translating binary data to and from XML is to create an accurate description of the binary data. For binary data (data that is not self-describing), you must identify the following elements:

Format Builder is used to build the format definitions that are used for data translations.

 


Using Format Builder

Format Builder assists you in creating format descriptions for binary data. You use Format Builder to create hierarchical and detail information derived from structural and detailed analysis of your data. These format descriptions are stored in an MFL document. You can also use Format Builder to test your format descriptions before you apply them to your actual data.

Starting Format Builder

To start Format Builder, choose Start—>Programs—>BEA WebLogic E-Business Platform—>WebLogic Integration 2.1—>Format Builder. The Format Builder main window displays. If you did not use the installation directory defaults, your path may be different.

Using the Format Builder Main Window

The main window of Format Builder is split into two panes. The left pane (the navigation tree) shows the structural information for the data format. The right pane shows the detail for the item selected in the navigation tree.

Details of the file you are editing display in the Title Bar of the Format Builder main window.

Figure 2-1 Format Builder Main Window


 

The structure of the binary data is defined in the navigation tree using a combination of fields and groups that match the target data.

The following topics discuss the parts of the main window and provide instructions for navigating and executing commands from the main window of Format Builder:

Using the Navigation Tree

The navigation tree represents hierarchical/structural information about the format of the binary data in a navigation tree. The root node of the navigation tree will correspond to the MFL document being created or edited. The root node is referred to as the Message node. Child nodes are labeled with group or field names. Fields are represented by leaf nodes in the navigation tree. Groups contain fields or other groups and are represented by non-leaf nodes in the navigation tree.

The icon for each node encapsulates information about the node. The icon indicates whether the node represents a message, a group, a field, a comment, or a reference. The icon also indicates whether a group or field is repeating, whether a group is a Choice of Children, and whether a group or field is optional or mandatory. You also have the ability to add, delete, move, copy, or rename nodes in the navigation tree. This is done through the menus or the toolbar (see Using the Menu Bar and Using the Toolbar).

The icons that appear in the navigation tree are described in the following table.

Table 2-1 Navigation Tree Icon Descriptions

Tree Icon

Icon Name

Description


Message Format

The top level element.


Group

Collections of fields, comments, and other groups or references that are related in some way (for example, the fields PAYDATE, HOURS, and RATE could be part of the PAYINFO group). Defines the formatting for all items contained in the group.


Optional Group

A group that may or may not be included in the message format.


Repeating Group

A group that has one or more occurrence.


Optional Repeating Group

A group that may or may not be included, but if included, may occur more than once.


Group Reference

Indicates that another instance of the group exists in the data. Reference groups have the same format as the original group, but you can change the optional setting and the occurrence setting for the reference group.


Group Choice

Indicates that only one of the items in the group will be included in the message format.


Field

Sequence of bytes that have some meaning to an application. (For example, the field EMPNAME contains an employee name.) Defines the formatting for the field.


Optional Field

A field that may or may not be included in the message format.


Repeating Field

A field that has one or more occurrences.


Optional Repeating Field

A field that may or may not be included, but, if included, may occur more than once in the message format.


Field Reference

Indicates that another instance of the field exists in the data. Reference fields have the same format as the original field, but you can change the optional setting and the occurrence setting for the reference field.


Comment

Contains notes about the message format or the data translated by the message format.


Collapse

A minus sign next to an object indicates that it can be collapsed.


Expand

A plus sign next an object indicates that it can be expanded to show more objects.


 

Using the Menu Bar

The Menu bar displays the menu headings. The menu items that are available depend on what is selected in the navigation tree and the state of the navigation tree. Click a menu heading to open the menu and choose a command.

Figure 2-2 Format Builder Menu Bar


 

All Format Builder menus are expandable from your keyboard by pressing Alt + mnemonic keys. Some menu commands are also executable using Ctrl + letter accelerator keys.

Note: Menu items that appear in gray are unavailable for the current selection.

Using the Toolbar

The toolbar provides buttons that access some of the frequently used commands in the menus. To activate a command, click its toolbar button. If a command is unavailable, its button appears grayed-out.

Figure 2-3 Format Builder Toolbar


 

The toolbar buttons provided with Format Builder are described below:

Table 2-2 Format Builder Toolbar Buttons

Toolbar Button

Name

Description


New

Creates a new Message Format.


Open

Opens an existing Message Format.


Save

Saves the current Message Format.


Cut

Removes the item currently selected in the left-hand pane, and its child objects, from the navigation tree. The item can be pasted elsewhere in the navigation tree.

Note: This action is not available if the Message Format (root) item is selected.


Copy

Makes a copy of the item currently selected in the left-hand pane for insertion elsewhere in the navigation tree.

Note: This action is not available if the Message Format (root) item is selected.


Paste as Sibling

Inserts the cut or copied item as a sibling object of the selected item.


Paste as Reference

Inserts a reference to the cut or copied item as a sibling object of the selected item.


Undo

Reverses the previous action. The tool tip changes to indicate the action that can be undone. For example, changing the name of a field to Address and clicking Apply causes the tool tip to read "Undo Apply Field Address". Format Builder supports multi-level undoing and redoing.


Redo

Reverses the effects of an Undo command. The tool tip changes to indicate the action that can be redone. For example, changing the name of a field to Address and then undoing that action causes the tool tip to read "Redo Apply Field Address". Format Builder supports multi-level undoing and redoing.


Insert Field

Inserts a field as a sibling of the item selected in the navigation tree.


Insert Group

Inserts a group as a sibling of the item selected in the navigation tree.


Insert Comment

Inserts a comment as a sibling of the item selected in the navigation tree.


Move Up

Moves the selected item up one position under its parent.


Move Down

Moves the selected item down one position under its parent.


Promote item

Promotes the selected item to the next highest level in the navigation tree. For example, Field1 is the child object of Group1. Selecting Field1 and clicking the Promote tool makes it a sibling of Group1.


Demote item

Demotes the selected item to the next lower level in the navigation tree. For example, Group1 is the sibling of Field1. Field1 immediately follows Group1 in the navigation tree. Selecting Field1 and clicking the Demote tool makes it a child of Group1.


Expand All

Expands all items in the navigation tree to show child items.


Collapse All

Collapses the navigation tree to show first level items only.


Format Tester

Opens the Format Tester window.


 

Using the Shortcut Menus

Instead of using the standard menus to find the command you need, use the right mouse button to click an item in the navigation tree. The menu that appears shows the most frequently used commands for that item.

The following commands are available from the Shortcut Menus.

Note: Some commands may be unavailable, depending on the item you have selected in the navigation tree, or the state of the navigation tree at the time.

Table 2-3 Shortcut Menus

Menu Command

Description

Cut

Removes the item currently selected in the left-hand pane, and its child objects, from the navigation tree.

Copy

Makes a copy of the item currently selected in the left-hand pane for insertion elsewhere in the navigation tree.

Paste

Inserts the cut or copied item. An additional menu displays when you select Paste. You can choose to paste the item as a child or sibling of the selected item. In addition, you can choose to paste a reference to the cut or copied item as a sibling of the selected item.

Insert Group

Inserts a new group. You select whether to insert the group as a child or sibling of the selected item.

Insert Field

Inserts a new field. You select whether to insert the field as a child or sibling of the selected item.

Insert Comment

Inserts a comment. You select whether to insert the comment as a child or sibling of the selected item.

Duplicate

Makes a copy of the currently selected item. The duplicate item contains the same values as the original item. The name of the duplicate item is the same as the original item name, with the word "New" inserted before the original name. For example, duplicating a group called "Group1" results in a group with the name "NewGroup1".

When you duplicate an item with a numeric value in its name, the new item name contains the next sequential number. For example, duplicating "NewGroup1" results in a group named "NewGroup2".

Delete

Deletes the selected item.


 

Using Drag and Drop

You can drag and drop to copy and/or move the items in the navigation tree.

Note: The node being copied or moved is always inserted as a sibling of the selected node during the drag and drop process. If you drag and drop the node onto the message format node, it is inserted as the last child.

To use drag and drop to move an item:

  1. Select the item you want to move.

  2. Press and hold the left mouse button while you drag the item to the desired node.

  3. When the item is in the desired location, release the left mouse button. The item is moved to the new location.

To use drag and drop to copy an item:

  1. Select the item you want to copy.

  2. Press and hold the CTRL key.

  3. Keeping the CTRL key depressed, press and hold the left mouse button while you drag the item to the desired node.

  4. With the sibling object selected, release the left mouse button. A copy of the item is placed at the new location.

Creating a Message Format

The first step in creating a Message Format Definition file is to create a message format (the root node of a message format file).

To create a message format:

  1. Choose File—>New. The Message Format Properties pane displays in the detail window.

    Figure 2-4 Message Format Properties


     

  2. Enter data in the fields as described in the following table.


     

Message Formats, Fields, and Groups are identified by a Name. The name that is specified is used as the XML tag when binary data is translated to XML by WebLogic Integration. Thus the name must conform to the XML rules for a name.

The rules for names are as follows:

The following are valid name examples:

MyField
MyField1
MyField_again
MyField-again

The following are invalid name examples:

1MyField - may not start with a digit
My>Field - the greater-than sign (>) is an illegal character
My Field - a space is not permitted

Creating a Group

Groups are collections of fields, comments, references and other groups that are related in some way (for example, the fields PAYDATE, HOURS, and RATE could be part of the PAYINFO group). You can create a group as a child of the message format item, as a child of another group, or as a sibling of a group or field.

To create a group:

  1. Select an item in the navigation tree.

  2. Choose Insert—>Group—>As Child if you want to create the group as the child of the message format or another group. Choose Insert—>Group—>As Sibling if you want to create the group as the sibling of another group or a field. The Group Details display in the detail window.

    Figure 2-5 Group Details


     

  3. Enter data in the fields as described in the following table.

    Table 2-5 Group Detail Properties

    Field

    Description

    Group Description

    Name

    The name of the group. This name must comply with XML element naming conventions.

    Optional

    Choose Optional if this is an optional group.

    Choice of Children

    Choose Choice of Children if only one of the items in the group will be included in the message format.

    Group Occurrence

    Occurrence

    Choose one of the following to indicate how often this group appears in the message format:

    Note: Unless a group is defined as Optional, all groups occur at least once.

    Group Attributes

    Group is Tagged

    Select this option if this is a tagged group. Being tagged means that a literal precedes the other content of the group, which could be other groups or fields.

    Group Delimiter

    None

    Select this option if the group has no delimiter.

    Delimited

    Groups can have their termination point specified by a delimiter. A delimiter is a string of characters that marks the end of the group of fields. The group continues until the delimiter characters are encountered.

    Select this option if the end of the group is marked with a delimiter.

    Value - Enter the delimiter that marks the end of the group of fields.

    Note: Normally, groups are not delimited. They are usually parsed by content (the group ends when all child objects have been parsed).

    Delimiter Field

    Groups can have their termination point specified by a field that contains a delimiter character string. A delimiter is a string of characters that mark the end of the group. The group continues until the delimiter character string contained in the specified field is encountered.

    For more information on delimiters, see Specifying Delimiters.

    Delimiter is Shared

    Indicates that the delimiter marks both the end of the group of data, and the end of the last field of the group. The delimiter is shared among the group, and the last field of the group, to delimit the end of the data.

    Group Update Buttons

    Apply

    Saves your changes to the message format document.

    Duplicate

    Makes a copy of the group currently displayed. The duplicate group contains the same values as the original group. The name of the duplicate group is the same as the original group name, with the word "New" inserted before the original name. For example, duplicating a group called "Group1" results in a group with the name "NewGroup1".

    When you duplicate an item with a numeric value in its name, the new item name contains the next sequential number. For example, duplicating "NewGroup1" results in a group named "NewGroup2".

    Reset

    Discards your changes to the detail window and resets all fields to the last saved values.

    Help

    Displays online help information for this detail window.


     

  4. Click Apply to save your changes to the message format file, or click Reset to discard your changes to the detail window and reset all fields to the last saved value.

    Note: The Apply and Reset buttons are only enabled once changes are made to the detail panel's components.

Specifying Delimiters

You can specify delimiters in Format Builder by entering the correct syntax. For example, if you want to specify a tab character as the delimiter (`\u009'), you would enter the construct \t to match it.

Table 2-6 Character Delimiters

Construct

Matches

x

The character x

\\

The backlash

\0n

The character with octal value 0n (<= n <= 7)

\0nn

The character with octal value 0nn (0 <= n <= 7)

\0mnn

The character with octal value 0mnn (0 <= m <= 3, 0 <= n <= 7)

\xhh

The character with hexadecimal value 0xhh

\uhhhh

The character with hexadecimal value 0xhhhh

\t

The tab character ('\u0009')

\n

The newline (line feed) character ('\u000A')

\r

The carriage-return character ('\u000D')

\f

The form-feed character ('\u000C')

\a

The alert (bell) character ('\u0007')

\e

The escape character ('\u001B')

\cx

The control character corresponding to x


 

For more information, visit the following URL:

http://java.sun.com/j2se/1.4/docs/api/java/util/regex/Pattern.html

Creating a Field

Fields are a sequence of bytes that have some meaning to an application. (For example, the field EMPNAME contains an employee name.) You can create a field as a child of the message format item, as a child of a group, or as a sibling of a group or another field. The field name is used as the element name in the XML document and must comply with XML naming conventions.

To create a field:

  1. Select an item in the navigation tree.

  2. Choose Insert—>Field—>As Child if you want to create the field as the child of the message format or group. Choose Insert—>Field—>As Sibling if you want to create the field as the sibling of another field or a group. The Field Details display in the detail window.

    Figure 2-6 Field Details


     

  3. Enter data in the fields as described in the following table.

    Table 2-7 Field Detail Properties

    Field

    Description

    Field Description

    Name

    The name of the field. This name must comply with XML element naming conventions.

    Optional

    Select this option if this is an optional field. Optional means that the data for the field may or may not be present.

    Type

    Select the data type of the field from the drop-down list. The default is String.

    Note: The Field Type you select dictates the Field Data Options that appear on the dialog box.

    Refer to Supported Data Types, for a list of data types supported by WebLogic Integration.

    Field Occurrence

    Occurrence

    Choose one of the following to indicate how often this field appears in the message format:

    Note: Unless a field is defined as optional, the field will occur at least one time.

    Note: The fields that display in the following sections of the detail window depend on the Field Type selected.

    Field Attributes

    Field is Tagged

    Select this option if this is a tagged field. Being tagged means that a literal proceeds the data, indicating that the data is present. You must also choose the data type of the tag field from the drop-down list box. For example: SUP:ACME INC, SUP: is a tag. ACME INC is the field data.

    If you selected the Field is Tagged option, enter the tag in the text box to the right of the checkbox.

    Field Default Value

    Select this option to specify a value for the data of the field that will be inserted into the binary data if the field is not present in the XML.

    Note: If the field does not occur in the binary data and it is not optional, then the binary data will fail to parse even if there is a default value given.

    Data Base Type

    If the field is a date or time field, the base type indicates what type of characters (ASCII, EBCDIC, or Numeric) make up the data.

    Year Cutoff

    If the field is a date field that has a 2-digit year, the year cutoff allows the 2-digit year to be converted to a 4-digit year. If the 2-digit year is greater than or equal to the year cutoff value, a `19' prefix will be added to the year value. Otherwise a `20' prefix will be used.

    Code Page

    The character encoding of the field data. The default code page is set by choosing Tools—>Options dialog box.

    Value

    The value that appears in a literal field.

    Field Termination

    Length

    Variable-sized data types can have their length set to a fixed value.

    Imbedded Length

    Variable-sized data types can have their termination point specified by an imbedded length. An imbedded length precedes the data field and indicates how many bytes the data contains.

    Delimiter

    Variable-sized data types can have their termination point specified by a delimiter. A delimiter is a value that marks the end of the field. The field data continues until the delimiter is encountered.

    Delimiter Field

    Variable-sized data types can have their termination point specified by a field that contains a delimiter value. A delimiter is a value that marks the end of the field. The field data continues until the field containing the delimiter is encountered.

    For more information on delimiters, see Specifying Delimiters.

    Decimal Position

    Specifies the number of digits (0-16) to the left of the decimal point.

    Field Update Buttons

    Apply

    Saves your changes to the message format file.

    Duplicate

    Makes a copy of the field currently displayed. The duplicate field contains the same values as the original field. The name of the duplicate field is the same as the original field name, with the word "New" inserted before the original name. For example, duplicating a field called "Field1" results in a field with the name "NewField1".

    When you duplicate an item with a numeric value in its name, the new item name contains the next sequential number. For example, duplicating "NewField1" results in a group named "NewField2".

    Reset

    Discards your changes to the detail window and resets all fields to the last saved values.

    Help

    Displays online help information for this detail window.


     

  4. Click Apply to save your changes to the message format file, or click Reset to discard your changes to the detail window and reset all fields to the last saved value.

    Note: The Apply and Reset buttons are only enabled once changes are made to the detail panel's components.

Creating a Comment

Comments contain notes about the message format or the data translated by the message format. Comments are included in the message format definition for documentation and informational purposes only. You can create a comment as a child or sibling of any message format, group, or field. Comments are unnumbered in the MFL document and are not transformed to the XML or Binary data.

Note: Conventionally, the comment usually precedes the node it intends to document.

To create a comment:

  1. Select an item in the navigation tree.

  2. Choose Insert—>Comment—>As Child if you want to create the comment as the child of the selected item. Choose Insert—>Comment—>As Sibling if you want to create the comment as the sibling of the selected item. The Comment Details display in the detail window.

  3. Enter data in the fields as described in the following table.

    Figure 2-7 Comment Details


     


     

  4. Click Apply to save your changes to the message format file, or click Reset to discard your changes to the Comment Details window and reset the field to the last saved value.

    Note: The Apply and Reset buttons are only enabled once changes are made to the detail panel's components.

Creating References

References indicate that the description of the field or group format has been previously defined and you want to reuse this description without re-entering the data. Reference fields or groups have the same format as the original field or group, but you can change only the optional setting and the occurrence setting for the reference field or group. For example, if you have a "bill to" address and a "ship to" address in your data and the format for the address is the same, you only need to define the address format once. You can create the "bill to" address definition and create a reference for the "ship to" address.

Note: References are named exactly the same as the original item. For example, the "bill to" address definition and the "ship to" address definition would be named the same. If you want to reuse a group definition, create a generic group and embed it within a specific group. For example, in the previous example, you can create an address group within a bill_to group and reference address within a ship_to group.

To create a reference:

  1. Select a field or group in the navigation tree.

  2. Choose Edit—>Copy.

  3. Choose the proper sibling in the navigation tree.

  4. Choose Edit—>Paste—>As Reference.

    Figure 2-8 Reference Details


     

  5. Enter data in the fields as described in the following table.


     

  6. Click Apply to save your changes to the message format file, or click Reset to discard your changes to the detail window and reset all fields to the last saved value.

    Note: The Apply and Reset buttons are only enabled once changes are made to the detail panel's components.

Working with Palettes

The palette allows you to store commonly used message format items and insert them into your message format definitions. These items are stored in an MFL document, and you can use the drag and drop feature (see Using Drag and Drop) to copy items from the palette into your message format definition. You can also open any MFL document in the palette and reuse any message format items.

Opening the Palette

To open the palette:

  1. Start Format Builder.

  2. Choose View—>Show Palette. The palette window displays.


     

You may reorder or change the hierarchy within the palettes by using drag and drop or the Context menu. The contents of the palette are automatically saved when you exit Format Builder.

Note: You can only copy items from the navigation tree to the palette and vice versa. You cannot move items between the windows.

The WebLogic Integration palette contains some common date formats, literals, and strings. You can use these items in the message formats you create, as well as adding your own items to the palette.

Using the File Menu

The following commands are available from the palette's File menu.

Table 2-10 Reference Detail Properties

Menu Command

Description

Open

Opens an existing message Format.

Save

Saves any message format items you have added to the palette, or any existing items you have modified. The default palette is named palette.xml and is stored in the Format Builder installation directory.

Hide Palette

Closes the Palette window.


 

Using the Shortcut Menu

The following commands are available from the palette's shortcut menu. You can access the shortcut menu by right-clicking within the palette window.

Note: Some commands may be unavailable, depending on the time you have selected in the navigation tree.

Table 2-11 Shortcut Menu Commands

Menu Command

Description

Insert

Inserts a new group in the palette. When you select this command, a window displays asking you to supply the name of the new group.

Rename

Displays a window asking you to supply the new name of the group.

Delete

Deletes the selected item.

Move Up

Moves the selected item up one position under its parent.

Move Down

Moves the selected item down one position under its parent.

Promote

Promotes the selected item to the next highest level in the navigation tree. For example, Field1 is the child object of Group1. Selecting Field1 and clicking the Promote tool makes it a sibling of Group1.

Demote

Demotes the selected item to the next lower level in the navigation tree. For example, group1 is the sibling of Field1. Field1 immediately follows Group1 in the navigation tree. Selecting Field1 and clicking the Demote tool makes it a child of Group1.


 

Adding Items to the Palette

To add items to the palette:

  1. Choose View—>Show Palette to display the palette.

    Note: If the Palette window is already displayed, skip this step.

  2. From the navigation tree, choose the item you want to add to the palette.

  3. Drag the item into the palette window.

  4. When the item is placed in the position you want it (as sibling of the selected item), release the mouse button. The item is copied to the palette window.

Notes: You cannot add any node that depends on the existence of another node to the palette. For example, you cannot add Field or Group References, and you cannot add items that have a Repeat Field specified.

Adding comments is possible, but not recommended since comments do not have unique names and therefore are indistinguishable on the palette.

Deleting Items From the Palette

To delete items from the palette:

  1. Select the item in the palette to be deleted and click the right mouse button. The Shortcut Menu displays.

  2. Choose Delete. A message displays asking you to confirm the deletion.

  3. Click OK to delete the item.

Adding Palette Items to a Message Format

To copy items from the palette to a message format:

  1. Choose View—>Show Palette to display the palette.

    Note: If the Palette window is already displayed, skip this step.

  2. From the palette window, choose the item you want to add to your message format.

  3. Drag the item into the navigation tree.

  4. When the item is placed in the position you want it (as the sibling of the desired item), release the mouse button. The item is copied from the palette to the message format.

Saving a Message Format to a File

To save a message format file for the first time:

  1. Choose File—>Save As. The Save As dialog box displays.

    Figure 2-9 Save As Dialog Box


     

  2. Navigate to the directory where you want to save the file.

  3. In the File Name text box, type the name you want to assign to the file.

  4. Format Builder automatically assigns the .mfl extension to message format files by default if no extension is given.

  5. Click Save As to save the file in the specified location with the specified name and extension.

To save a message format file using the same name, choose File—>Save. The file is saved in the same location with the same name and extension.

To save a message format file using a different name, choose File—>Save As and follow steps 1 through 5 above.

Using Internationalization Features

You can use the internationalization features in Format Builder by changing the options for an individual message file or by setting the default options.

See Also:

Opening an Existing Message Format File

To open an existing message format file:

  1. Choose File—>Open. The Open dialog box displays.

    Figure 2-10 Open Dialog Box


     

  2. Navigate to the directory containing the desired file and select the file name.

  3. Click Open. The file is loaded into Format Builder.

Changing Options for a Message Format

To change options for a message format file:

  1. Select a Message Format from the navigation tree.

  2. Choose File—>Properties. The File Properties dialog box displays the Message Format Version and the Default Message Format (MFL) Encoding.

    Figure 2-11 File Properties Dialog Box


     

  3. Select the character encoding for the Message Format Layout (MFL) from the list of encoding names and descriptions for this file. (To change the default settings, select Tools—>Options.)

  4. Click OK. The message format file will reflect your changes when you test it using Format Tester.

Working With the Repository

The repository provides a centralized document storage mechanism that supports the following four document types:

The repository allows the supported documents to be shared within WebLogic Integration. The repository provides access to these document types and provides manipulation of repository documents including access to the document text, description, notes, and removal of the document. The repository allows the supported documents to be shared between business process management, WebLogic Server, and B2B integration. The repository also includes a batch import utility that allows previously constructed MFL, DTD, XML Schema, and XSLT documents residing on a different file system to be easily migrated into the repository.

Retrieving Repository Documents

Perform the following steps to retrieve an MFL document from the repository:

  1. Start Format Builder.

  2. Choose Repository—>Log In. The Repository Log In dialog box opens. Enter your user name, password, and the server where the repository resides.

  3. Choose Repository—>Retrieve. The Select-document-to-retrieve dialog box opens.

  4. Select the document you want to retrieve from the document list.

  5. Click Retrieve. The Select-document-to-retrieve dialog box is dismissed and you are returned to the Format Builder main window with your selected document listed in the navigation tree.

Once you have retrieved the specified document, you can edit it as you would any MFL document within Format Builder, store the document back into the repository, store the document back into the repository with a different name, or save as a local file.

Anytime you open a document that is stored in the repository, a read-only Document Repository Properties box displays in the Message Format detail panel when the message format node is selected. This properties box provides you with a document description and any notes that were attached to the document.

Storing Repository Documents

Perform the following steps to store a MFL document in the repository:

  1. Start Format Builder.

  2. Open the MFL document you want to store in the repository.

  3. Log in to the repository.

  4. Choose Repository—>Store As. The Store As dialog box opens.

  5. Enter the name you want to associate with this repository document in the Name field.

  6. Enter a description of the repository document in the Description field.

  7. Enter any notes you would like attached to the document in the Notes field.

  8. Click Store. The Store As dialog box is dismissed and your MFL document displays in the navigation tree. A Document Repository Properties box with document Description and Notes information displays in the right pane.

If your Format Builder options specify generation of a DTD/XML Schema, these documents will also be stored in the repository using the supplied name.

Setting Format Builder Options

You can set several options to control the overall operation of Format Builder.

To set Format Builder options:

  1. Choose Tools—>Options. The Options dialog box displays.

    Figure 2-12 Format Builder Options Dialog Box


     

  2. Enter data in the fields as described in the following table.

    Table 2-12 Format Builder Options Properties

    Field

    Definition

    Default Message Format Version

    Select the MFL version used when creating new documents.

    Note: Message formats contain their own format version specified on the Message Format pane.

    Character Encoding Options

    Default Message Format (MFL) Encoding

    Select the character encoding default for the Message Format Layout (MFL) from the list of encoding names and descriptions. This defines the format that your MFL document and XML output will take.

    Default Field Code Page

    Select the default field code page from the list of binary formats. This selection will be the default code page for each field that is created in your MFL document. It specifies the character encoding of the binary data for each field.

    XML Formatting Options

    Initial Indent

    Enter the number of spaces to indent the first line of the XML document created by WebLogic Integration.

    New Line Indent

    Enter the number of spaces to indent a new child line of the XML document created by WebLogic Integration.

    XML Content Model Options

    Auto-generate DTD

    Generates a DTD document when you save or store the MFL document. This document will be placed in the same directory as the message format when saving to a file and in the repository when storing.

    Auto-generate Schema

    Generates an Schema file when you save the MFL document. This document will be placed in the same directory as the message format when saving to a file and in the repository when storing.

    Action Buttons

    OK

    Saves your changes and closes this detail window.

    Cancel

    Discards your changes and closes this detail window.


     

Format Builder Menus

The following menus are available in Format Builder.

File Menu

The following commands are available from the File Menu.

Note: Some commands may be unavailable, depending on the actions you have taken.

Table 2-13 File Menu Commands

Menu Command

Description

New

Creates a new Message Format document.

Open

Opens an existing Message Format document.

Close

Closes the current Message Format document.

Save

Saves the current Message Format document.

Save As

Saves the current Message Format under a different name.

Properties

Opens the Properties dialog box for the currently loaded message format.

Exit

Exits Format Builder.


 

Edit Menu

The following commands are available from the Edit Menu.

Note: Some commands may be unavailable, depending on the actions you have taken and the state of the navigation tree and its items.

Table 2-14 Edit Menu Commands

Menu Command

Description

Undo

Reverses the previous action. The Undo command in the Edit Menu changes to indicate the action that can be undone. For example, changing the name of a field to Field1 and clicking Apply causes the Edit Menu to read "Undo Apply Field Field1".

Redo

Reverses the effects of an Undo command. The Redo command in the Edit Menu changes to indicate the action that can be redone. For example, changing the name of a field to Field1 and then undoing that action causes the Edit Menu to read "Redo Apply Field Field1".

Cut

Removes the item currently selected in the left-hand pane, and it's child objects, from the navigation tree. This item is placed on the clipboard for pasting into another location.

Note: This action is not available if the Message Format (root) item is selected.

Copy

Makes a copy of the item currently selected in the left-hand pane for insertion elsewhere in the navigation tree.

Note: This action is not available if the Message Format (root) item is selected.

Paste

Inserts the cut or copied item. An additional menu displays when you select Paste. You can choose to paste the item as a child or sibling of the selected item. In addition, you can choose to paste a reference as a sibling of the selected item.

Duplicate

Makes a copy of the item selected in the navigation tree. The duplicate item contains the same values as the original item. The name of the duplicate item is the same as the original item name, but the word "New" is inserted before the original name. For example, duplicating an item called "Field1" results in an item with the name "NewField1".

When you duplicate an item with a numeric value in its name, the new item name contains the next sequential number. For example, duplicating "NewGroup1" results in a group named "NewGroup2".

Delete

Deletes the item selected in the navigation tree, as well as all child objects of that item.

Move Up

Moves the selected item up one position under its parent.

Move Down

Moves the selected item down one position under its parent.

Promote

Promotes the selected item to the next highest level in the navigation tree. For example, Field1 is the child object of Group1. Selecting Field1 and clicking the Promote tool makes it a sibling of Group1.

Demote

Demotes the selected item to the next lower level in the navigation tree. For example, Group1 is the sibling of Field1. Field1 immediately follows Group1 in the navigation tree. Selecting Field1 and clicking the Demote tool makes it a child of Group1.


 

Insert Menu

The following commands are available from the Insert Menu.

Table 2-15 Insert Menu Commands

Menu Command

Description

Field

Inserts a new field. You can choose whether to insert the field as a child or sibling of the item selected in the navigation tree.

Group

Inserts a new group. You can choose whether to insert the group as a child or sibling of the item selected in the navigation tree.

Comment

Inserts a comment. You can choose whether to insert the comment as a child or sibling of the item selected in the navigation tree.


 

View Menu

The following commands are available from the View Menu.

Table 2-16 View menu Commands

Menu Command

Description

Show Palette

Displays the palette window.

Expand All

Expands the entire navigation tree to show the child objects of all items in the navigation tree.

Collapse All

Collapses the entire navigation tree to show only the root message format.


 

Repository Menu

The following commands are available from the Repository Menu.

Table 2-17 Repository Menu Commands

Menu Command

Description

Log In

Displays the WebLogic Integration Repository Login dialog box, allowing you to connect to the repository.

Log Out

Disconnects from the repository.

Retrieve

Retrieves a document from the repository.

Store

Stores the current document in the repository.

Store As

Stores the current document in the repository under a different name.


 

Tools Menu

The following commands are available from the Tools Menu.

Table 2-18 Tools Menu Commands

Menu Command

Description

Import

Displays a list of the installed importers. Choose the importer from which you want to import a message.

Test

Opens Format Tester.

User Defined Types

Opens the Add/Remove User Defined Types dialog box.

Options

Displays the Format Builder Options dialog box.


 

Help Menu

The following commands are available from the Help Menu.

Table 2-19 Help Menu Commands

Menu Command

Description

Help Topics

Displays the main Help screen.

How Do I

Provides step-by-step instructions for performing the basic tasks in Format Builder.

About

Displays version and copyright information about Format Builder and the JDK you are running.


 

 

back to top previous page next page