Skip navigation.

Using WebLogic Integration - Business Connect

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

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

 


Create 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—>BEA WebLogic Integration - Business Connect 8.1—>Document Generator on the Start menu.
  2. On UNIX log in to the cyclone 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 Run Document Generator From a Command Line.

    Figure 14-1 Document Generator Window

    Document Generator Window


     
  3. Click EDI Generator or XML Generator to open the EDI or XML Document Generator window. The two windows are similar, but only the EDI window has Control ID and Input template fields.
  4. Figure 14-2 EDI Document Generator Window

    EDI Document Generator Window


     
  5. Complete the fields. See Field Descriptions.
  6. 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.

Input template (EDI only)

If you want to use your own EDI document as the template for creating test EDI documents, click Browse to point to the document on your system. Document Generator copies your document and inserts your specified sender, receiver and control ID in the generated test documents.

If you want Document Generator to create documents for you, leave this field blank.

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 in minutes the Document Generator waits to create the next document or set of documents.

 


Run 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 DocumentGenerator as one string with no spaces between words.

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 Create EDI or XML Test Documents.

Command Line Parameters

The following table shows the command line parameters for the Document Generator. You do not have to use the parameters in the order listed.

Parameter

Description

Usage

-type

Valid document types are EDI or XML.

Required

-sender

ID of the sender.

Required

-receiver

ID of the receiver.

Required

-docid

The number to use as the control ID of the first EDI document to be generated.

Do not use for XML documents because they do not have control IDs.

Required for EDI

N/A for XML

-outpath

The directory where the Document Generator writes the outbound documents. This is typically the sender's EDI-out or XML-out directory.

Required

-size

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

Required

-ndocs

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.

Required

-infile

The path to the EDI document on your system that you want to use as the template for generating test documents.

You can use copies of your own EDI document as the test documents rather than the test documents that Document Generator creates for you. If you use your own EDI document as the template, Document Generator copies it and inserts your specified sender, receiver and control ID.

Optional for EDI

N/A for XML

-interval

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

If you do not use a value, Document Generator creates the number of documents specified by -ndocs once. If you use a value, Document Generator creates the specified number of documents at the specified interval until you stop the tool.

Optional

-h, -help or ?

Displays a list of the parameters.

Optional


 

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 -type edi -sender company1 -receiver partner1 -docid 302 -outpath /home/cyclone/ci400/data/company1/ediout -size 3 -ndocs 7 -interval 5

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.

documentgenerator -type edi -sender company1 -receiver partner1 -docid 302 -outpath [installation_directory]/data/company1/ediout -size 3 -ndocs 7 -interval 5

Press Ctrl-C in the DOS window to stop the Document Generator.

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.

 

Skip navigation bar  Back to Top Previous Next