bea.com | products | dev2dev | support | askBEA
 Download Docs 
Search

Using WebLogic Integration - Business Connect

 Previous Next Contents Index View as PDF  

Document Generator

The Document Generator utility is included with WebLogic Integration - Business Connect. You can use it to create test documents that conform to the structures of X12 EDI or XML formats. To create an end-to-end test, you can generate documents of any size and send them at any interval you choose to another WebLogic Integration - Business Connect server.

The following topics are provided about using Document Generator to create test trading documents.

Procedures

Concepts

 


Creating EDI or XML Test Documents

Use this procedure to create EDI or XML test documents in Document Generator and put them in an output directory.

You can run multiple sessions of the Document Generator. Each session can generate different document types, sizes and rates.

Steps

  1. On Windows select Programs—>WebLogic Integration - Business Connect—>Document Generator on the Start menu.

    On UNIX log in to the account you created previously. Ensure that you have X Windows connectivity to the server where you installed the application. Run the following command to open the Document Generator:

    installation_directory/bin/docgen

    You also can run the Document Generator from a command line. See Running Document Generator from a Command Line.

    Figure 13-1 Document Generator Window


     

  2. Click Generate EDI or Generate XML to open the EDI or XML Document Generator window. The two windows are the same, except only the EDI window has a Control ID field.

    Figure 13-2 EDI Document Generator Window


     

  3. Complete the fields. See Field Descriptions.

  4. Click Generate to generate the number and size of documents you specified. The Document Generator continues to generate documents at the interval you specified until you click Stop or close the EDI or XML Document Generator window.

Field Descriptions

The following describes the fields on the EDI and XML Document Generator windows. For procedure see Steps.

Sender's ID

Type the ID of the sender.

Receiver's ID

Type the ID of the receiver.

Control ID (EDI only)

Type any numeric control ID. This is the starting number for the document counter.

Output Directory

Type the directory where the Document Generator writes the outbound documents. Or, use the Browse button to locate this directory. This is typically the sender's EDI or XML out directory.

Documents to generate

Type any value between 1 and 999999 to indicate the number of documents you want to create per unit of time. The Document Generator creates all of these documents at once.

Document size (K)

Type any value between 1 and 999999 to indicate the size of each document you want to create.

Regeneration time (min)

Type any value between 1 and 999999 to indicate the time the Document Generator waits to create the next document or set of documents.


 

 


Running Document Generator from a Command Line

You can use Document Generator from a command line without the graphical user interface (GUI). You do this by running a command with parameters for the test documents you want to create. On UNIX, the command is docgen. On Windows in a DOS window the command is "Document Generator" in quotation marks as shown.

You cannot pause the Document Generator from the command line as you can when using the Document Generator GUI. Only one Document Generator at a time can be started from the command line in a single DOS window or terminal window.

Note: If you run WebLogic Integration - Business Connect on UNIX and there are spaces in the sender's or receiver's ID, we recommend that you use the Document Generator GUI. See Creating EDI or XML Test Documents.

The following topics are provided for running Document Generator from a command line:

Command Line Parameters

The following table shows the command line parameters for the Document Generator. They are mapped to the parallel fields on the GUI (see Creating EDI or XML Test Documents). The parameters are listed in the order of entry and not the order of the parallel GUI fields.

Table 13-1 Document Generator Command Line Parameters

Command line parameter

GUI field

Description

sender

Sender's ID

Type the ID of the sender.

recipient

Receiver's ID

Type the ID of the receiver.

size

Document size (K)

Type any value between 1 and 999999 to indicate the size of each document you want to create.

numDocsPerInterval

Documents to generate

Type any value between 1 and 999999 to indicate the number of documents you want to create per unit of time. The Document Generator creates all of these documents at once.

outFolder

Output Directory

Type the directory where the Document Generator writes the outbound documents. This is typically the sender's EDI, XML or binary out directory.

aDocNum

Control ID

For XML type 1. For EDI type any numeric control ID. This is the starting number for the document counter.

aDocType

not applicable

Type EDI or XML.

interval

Regeneration time (min)

Type any value between 1 and 999999 to indicate the time the Document Generator waits to create the next document or set of documents.

This parameter is optional. If not used, the system displays the specified number of documents generated and returns to the command line.


 

Command Line Format

The following are examples for running Document Generator from a command line. Be sure you run the utility from the WebLogic Integration - Business Connect bin directory.

UNIX

For UNIX, the following example shows the command line format for Company1 to create 7 EDI documents that are 3K in size every 5 minutes and place them in the EDI out directory for sending to Partner1. The control ID is 302.

./docgen company1 partner1 3 7 /home/account/ci400/data/company1/ediout 302 edi 5

The following example shows the command line format for Company1 to create 5 XML documents that are 24K in size and place them in the XML out directory for sending to Partner1. The control ID is 1. Notice that the last parameter, interval, is omitted, so only a single group of 5 documents will be created.

./docgen company1 partner1 24 5 /home/account/ci400/data/company1/xmlout 1 xml

If you run the docgen command without any parameters, the GUI opens.

To stop the generator, execute installation_directory/bin/processes. From the resulting output, locate the PID associated with docgen, and execute the kill command on the PID.

Windows

For Windows, the following example shows the proper command line format.

"Document Generator" Company1 Partner1 24 5 C:\installation_directory\data\Company1\xmlout 1 XML

Pressing Ctrl-C (in the DOS window) stops the Document Generator and the system returns to the command prompt.

If there are spaces in the sender's or receiver's ID or out directory name, place the IDs or directory name in quotation marks so Windows properly handles the spaces. The following is an example of the format:

"Document Generator" "SenderID" "ReceiverID" Size NumDocsPerInterval "OutFolder" ControlID DocType [Interval]

 

Back to Top Previous Next