Format Builder
Importing Meta Data
BEA Format Builder includes the following utilities that allow you to import COBOL copybooks, gXML guideline files, and convert a C structure definition into MFL Message Definition.
Importing a Guideline XML File
Format Builder includes a feature that allows you to import a guideline XML (gXML) file and convert it into a message definition, which you can modify and customize to suit your needs. gXML is an open specification designed to facilitate exchange of e-commerce guidelines for business documents (like purchase orders, invoices and so on) using XML. gXML version 0.71 is supported in this release.
To import a gXML file:
- Choose Tools—>Import—>EDI Importer. The EDI Importer dialog displays.
- Enter data in the fields as described in the following table:
Field
|
Description
|
gXML File Name
|
Type the complete path and name of the gXML file you want to import.
|
Browse
|
Click to navigate to the location of the gXML file you want to import.
|
Action Buttons
|
OK
|
Imports the gXML file you specified.
|
Cancel
|
Closes the dialog and returns to Format Builder without importing.
|
About
|
Displays information about the EDI Importer including the version.
|
Importing an XML Schema
Format Builder includes a feature that allows you to import an XML Schema representing the desired XML representation of your non-XML document. This can provide you with a jump-start on specifying the format of your non-XML document.
To import an XML schema:
- Choose Tools—>Import—>XML Schema Importer. The XML Schema Importer dialog displays.
- Enter data in the fields as described in the following table:
Field
|
Description
|
File Name
|
Type the path and name of the file you want to import.
|
Browse
|
Click to navigate to the location of the file you want to import.
|
Root Element
|
This value will be used as the root element in the transformed XML document. This name must comply with XML element naming conventions
|
MFL Field Delimiter Default
|
A delimiter is a character that marks the end of the field. The field data continues until the field containing the delimiter character is encountered.
|
Action Buttons
|
OK
|
Imports the XML Schema using the settings you defined.
|
Cancel
|
Closes the dialog and returns to Format Builder without importing.
|
Importing a COBOL Copybook
Format Builder includes a feature that allows you to import a COBOL copybook into Format Builder and create a message definition to transform the COBOL data. When importing a copybook, comments are used to document the imported copybook and the Groups and Fields it contains.
To import a COBOL copybook:
- Choose Tools—>Import—>COBOL Copybook Importer. The COBOL Copybook Importer dialog displays.
- Enter data in the fields as described in the following table:
Field
|
Description
|
File Name
|
Type the path and name of the file you want to import.
|
Browse
|
Click to navigate to the location of the file you want to import.
|
Byte Order
|
Big Endian
|
Select this option to set the byte order to Big Endian.
Note: This option is used for IBM 370, Motorola, and most RISC designs (IBM mainframes and most Unix platforms).
|
Little Endian
|
Select this option to set the byte order to Little Endian.
Note: This option is used for Intel, VAX, and Unisys processors (Windows, VMS, Digital, Unix, and Unisys).
|
Character Set
|
EBCDIC
|
Select this option to set the character set to EBCDIC.
Note: These values are attributes of the originating host machine.
|
US-ASCII
|
Select this option to set the character set to US-ASCII.
Note: These values are attributes of the originating host machine.
|
Other
|
The character encoding of the field data.
|
Action Buttons
|
OK
|
Imports the COBOL Copybook using the settings you defined.
|
Cancel
|
Closes the dialog and returns to Format Builder without importing.
|
About
|
Displays information about the COBOL Copybook importer including version and supported copybook features.
|
Once you have imported a copybook, you may work with it as you would any message format definition. If an error or unsupported data type is encountered in the copybook, a message is displayed informing you of the error. You can choose to display the error or save the error to a log file for future reference.
Importing C Structures
Format Builder includes a C structure importer utility that converts a C structure definition into an MFL Message Definition by generating MFL or C Code output.
Starting the C Structure Importer
To start the C Structure Importer:
- From the Format Builder main window, choose Tools—>Import—>C Struct Importer. The C Structure Importer dialog displays.
- The C Structure Importer dialog opens with MFL specified as the default output and contains the following fields.
Field
|
Description
|
Input
|
Input File
|
Enter the path and name of the file you want to import. You can also click the Browse button to navigate to the file you want to import.
|
Structure
|
This list box is populated with the list of structures found in the input file after it has been successfully parsed.
|
Parse
|
Click Parse to parse the input file. If successful, the Structure list box is populated with the list of structures found in the input file.
|
Output
|
Name
|
Specify an existing profile either by entering the file name or using the Browse button.
|
MFL
|
Specifies the data must be compiled on the target machine to generate MFL.
|
C Code
|
Specifies the data must be compiled on the target machine to generate C code.
|
Generating MFL Data
Perform the following steps to generate MFL data.
- Enter a file name in the Input File field, or click Browse to select a file.
- Click Parse to parse the file.
Upon completion, the Structure list box is populated with the list of structures found in the input file.
- Select the desired structure from the Structure drop-down list box.
At this point, you must provide some profile configuration data to generate the MFL directly. You can do this by creating a new hardware profile, or specifying an existing profile.
- Specify an existing profile or create a new one by performing one of the following procedures.
- Specify an existing profile either by entering the file name in the Hardware Profile Name field, or click Browse to select a file. Click Edit to open the hardware profile editor if you need to view or edit the profile parameters.
- Click New to create a new hardware profile. This opens the Hardware Profile editor loaded with the default parameters. Specify a Profile Name, a description, and modify the primitive data types and byte order to suit your needs.
- Click OK to save your hardware profile changes and return to the C Structure Importer dialog.
- Click OK to generate your MFL. If the generation is successful, you are returned to Format Builder with an MFL object listed in the navigation tree. The MFL object reflects the same name as the input file used in the parse operation.
If errors are detected during the generation process, the MFL Generation Errors dialog displays providing you the opportunity to view or file the error log.
- Click Display Error Log to view any errors encountered, click Save Error Log to save the error log to the location of your choice, or click Cancel to dismiss the MFL Generation Errors dialog box.
Once you have determined what errors were generated, you can return to the C Structure Importer and repeat the prior steps.
Generating C Code
Perform the following steps to generate C code.
- Enter a file name in the Input File field, or click Browse to select a file.
- Click Parse to parse the file.
Upon completion, the Structure list box is populated with the list of structures found in the input file.
- Select the desired structure from the Structure drop-down list box.
- Select the C Code option button.
- Enter a file name in either the MFL Gen or Data Gen fields, or click Browse to select a file.
- Click OK. You will be warned about overwriting existing files and notified about the success or failure of the code generation.
- Copy the generated source code to the platform in question and compile and execute it.
Note: You must copy the input file containing the structure declarations as well. Both programs, when compiled, take an argument of the output file name.
- Copy the generated MFL or data back to the platform running Format Builder.
Importing an FML Field Table Class
The FML Field Table Class Importer facilitates the integration of WebLogic Tuxedo Connector and business process management (BPM) functionality. Tuxedo application buffers are translated to and from XML by the FML to XML Translator that is a feature of WebLogic Tuxedo Connector.
The integration of Tuxedo with BPM functionality requires the creation of the XML that is passed between the WebLogic Tuxedo Connector Translator and the process engine. To create the necessary XML, use the FML Field Table Class Importer and the XML generation feature of Format Tester.
FML Field Table Class Importer Prerequisites
Before starting Format Builder:
- Move the field tables associated with the FML buffer from the Tuxedo system to the WebLogic Server/WebLogic Tuxedo Connector environment.
- Use the
weblogic/wtc/jatmi/mkfldclass
utility to build Java source code representing the field tables. For information about FML Field Table Administration, see the WebLogic Server documentation.
- Compile the source code. The resulting class files are called
fldtbl
classes because they implement the FldTbl
interface. These classes must be moved to a location specified in the Format Builder CLASSPATH
.
The SAMPLES_HOME\integration\samples\di\fml
directory contains several fldtbl
class fields that you can use as samples. These samples allow you to start Format Builder without completing the previous three steps.
Note: Because most users perform these steps when configuring WebLogic Tuxedo Connector, these class files may already exist.
Sample FML Field Table Class Files
The following table provides a listing and descriptions of the sample files installed for the FML Field Table Class Importer. All files are in the SAMPLES_HOME\integration\samples\di\fml
directory.
Table 10-1 FML Field Table Class Sample Files
Field
|
Description
|
bankflds.class
|
Compiled source file that serves as input to the FML Field Table Class Importer
|
bankflds.java
|
fldtbl source file generated by the mkfldclass utility
|
crdtflds.class
|
Compiled source file that serves as input to the FML Field Table Class Importer
|
crdtflds.java
|
fldtbl source file generated by the mkfldclass utility
|
tBtest1flds32.class
|
Compiled source file that serves as input to the FML Field Table Class Importer
|
tBtest1flds32.java
|
fldtbl source file generated by the mkfldclass utility
|
Creating XML with the FML Field Table Class Importer
To create an XML document with the FML Field Table Class Importer:
Note: If you create Java classes using WebLogic Tuxedo Connector, you can place the .class
files in the \ext
directory. You can then populate the Available Fields list automatically from the FML Field Table Class Importer dialog box.
- Choose Tools—>Import—>EDI Importer. The FML Field Table Class Importer dialog displays.
- Enter data in the fields as described in the following table:
Field
|
Description
|
Class Names
|
Type the name of the fldtbl class file to be processed.
Because a single FML buffer may contain fields from several field tables, you can enter one or more fldtbl class name files in the Class Names field. Items in the list should be separated by commas. Name are not required to include the .class extension.
Note: If any of the listed classes are not fldtbl classes created by the weblogic/wtc/jatmi/mkfldclass utility, or if they are not included in the Format Builder CLASSPATH, then an error dialog box is displayed. Even if an error occurs, however, the valid fldtbl classes in the list are processed.
|
Load
|
Click Load to display names of the fields from the field tables in the Available Fields list.
|
FML Field Selector
|
Available Fields
|
Displays the list of names from the field tables. Select the desired fields from the Available Fields list and click Add.
The Available Fields list does not allow duplicate names. Even if the name of a field appears in different field tables, it is included only once in the list.
|
Selected Fields
|
Displays the list of selected fields.
To remove fields from this list, select the fields and click Remove.
|
Action Buttons
|
Add
|
Moves the selected field from the list of Fields Available, to the Selected Fields list.
|
Remove
|
Removes the selected field from the list of Selected Fields, to the Fields Available list.
|
OK
|
Click OK after completing the list of selected fields. The dialog box closes and the name of the generated MFL is added to the Format Builder navigation tree. The selected fields are listed in the order in which they appear in the Selected Fields list.
|
Cancel
|
Closes the dialog and returns to Format Builder without importing.
|
- Edit the created MFL document to specify the order and number of occurrences of the fields in the XML document to be passed to the WebLogic Tuxedo Connector FML/XML Translator from business process management (BMP).
- Choose Tools—>Test to display the Format Tester tool.
- From the Format Tester menu bar, choose Generate—>XML to create an XML document that conforms to the MFL document in Format Builder.
- Edit the data content of the fields in the XML document as desired.
- From the Format Tester menu bar, choose File—>Save XML to save the XML document in a file with a specified name and location.
The created XML can be imported and used in business process management functions by using the XML instance editor. For information about importing XML, see the BPM documentation.