bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Using EDI

EDI Sample

This section describes the configuration and operation of the EDI sample. Because the EDI sample relies on the proper configuration of Power.Server!, you must configure Power.Server! before you can run the sample. (Such configuration is not a requirement for running the other samples provided with BEA WebLogic Integration.)

This section includes the following topics:

- Sample Overview

- Setting Up and Running the Sample

Sample Overview

The EDI sample contains a simple Purchase Order business process. Two trading partners are involved:

- Buyer: Advanced Networks Inc. (ANI)

- Supplier: General Control Systems (GCS)

Advanced Networks buys control system components from General Controls. ANI uses EDI to send Purchase Orders to GCS and to receive Purchase Order Acknowledgments from Supplier GCS.

The Sample is based on the assumption that Supplier GCS uses BEA WebLogic Integration as its business-to-business integration solution, that is, as the framework in which it exchanges EDI documents with its trading partners. The architecture of WebLogic EDI Integration is shown in the following figure.

Figure 6-1 EDI Sample Scenario

The EDI sample is based on the assumption that Supplier GCS uses WebLogic Integration as its business-to-business integration solution for communicating with its trading partners using EDI. The architecture of the EDI sample is shown in Figure 6-2.

Figure 6-2 EDI Sample Architecture

The sample consists of an inbound EDI 850 Purchase Order that is received by Power.Server! through an inbound file connection. The following summary describes the sequence of events in detail:

1. The EDI 850 is translated into a Purchase Order in XML format and sent to WebLogic Integration, using a target RMI Connection.

2. The XML document is received by the WebLogic Integration EDI Adapter and sent to a sample workflow, through the application integration plug-in, as an application integration event.

3. The sample workflow transforms the Purchase Order XML document into a Purchase Order Acknowledgment XML document and sends it to Power.Server!, via the EDI Adapter, using a service call.

4. The service call uses an RMI source connection to send the document to Power.Server!.

5. The Purchase Order Acknowledgment XML document is translated to an EDI 855 Purchase Order Acknowledgment and written to the file system using an outbound file connection.

Setting Up and Running the Sample

This section lists the prerequisites for executing the BEA WebLogic Integration EDI sample and instructions for running it.

Prerequisites

Before you run the EDI sample, you must install all product components of BEA WebLogic Integration, including:

- BEA WebLogic Server 6.1 SP1 or higher

- BEA WebLogic Integration 7.0

- Power.Enterprise! 3.1 (including Power.Server!and Power.Client!, which, in turn, consists of Power.Manager! and Power.Map!)

Note: Before you install the Power.Enterprise! software, make sure that your system meets the requirements and that you have any database access that is needed. For additional information about these prerequisites, see Installing BEA EDI Connect for WebLogic Integration.

Hardware and OS Requirements

Because the EDI sample is based on the assumption that you have access, on a single machine, to all of the software, including Power.Server!, Power.Manager!, and Power.Map!, the OS installation requirements are more restrictive than those for a production environment:

- Minimum memory available: 512 MB

- OS: Windows NT 4.0 with Service Pack 6 or Windows 2000 with
  Service Pack 1

Configuring the EDI Sample

Configuration and execution of the EDI sample require you to perform the following steps:

- Step 1: Start Power.Server!

- Step 2: Start Power.Manager! and Configure Partners

- Step 3: Start Power.Map! and Load Maps and Adapters

- Step 4: Set Up the Connections

- Step 5: Set Up the Exchange Profiles

- Step 6: Set Up the Workflow

- Step 7: Deploy the Application View

- Step 8: Run the Sample

The following files are available in SAMPLES_HOME\integration\samples\edi:

- Readme.txt

- WLI_EDI_SAMPLE.pdf

- XMLEnvelope.jar

- EDI850toPOXML.jar

- POAckXMLtoEDI855.jar

- EDISampleWorkflow.jar

- Edi850.edi

Note: Always start the Power.Server! before you start WebLogic Integration or WebLogic Server. The WebLogic Integration connectors expect Power.Server! to be running when they are initialized, and they throw exceptions if Power.Server! is not running when they are initialized.

Step 1: Start Power.Server!

Start Power.Server! by choosing Start Menu—>Programs—>Power.It—>Power.Server!. Wait approximately 10 seconds for the server to start.

Step 2: Start Power.Manager! and Configure Partners

1. Start Power.Manager! by choosing
   Start Menu—>Programs—>Power.It—>Power.Manager!.

   The Server Connection dialog box is displayed.

   Figure 6-3 Power.Manager! Server Connection Dialog Box

2. If no servers are listed in the left pane, click Add. The Add New Server dialog box is displayed.

   Figure 6-4 Power.Manager! Add New Server Dialog Box

   Enter the Server Hostname and Server Control Port of the EDI Server. Click Add.

3. Select the Power.Server! to which you want to connect and click Connect. The Server Connection dialog box is displayed.

   Figure 6-5 Power.Manager! Server Connection Dialog Box

   The Power.Manager! main window is displayed.

   Figure 6-6 Power.Manager!

4. Set up the company profiles. Click Partners, then click Company Profiles. The Company Profiles window is displayed.

   Figure 6-7 Company Profiles List

5. Create a Company Profile for GCS. Click the New Company icon: .

   The Company Properties dialog box is displayed.

   Figure 6-8 Company Properties Dialog Box for a New Company Profile

6. Add the required information about GCS.

7. Create a Company Profile for AES. Click the New Company icon: .

8. When the Company Properties dialog box is displayed, enter the required information about AES.

Step 3: Start Power.Map! and Load Maps and Adapters

1. Start Power.Map! by choosing Start Menu—>Programs—>Power.It—>Power.Map!. The Power.Map! main window is displayed.

   Figure 6-9 Power.Map! Main Window

2. Import the map to convert the EDI 850 transaction to Purchase Order XML. Choose File—> Import. From the Select Import JAR window select the following file:

   >     SAMPLES_HOME\integration\samples\edi\EDI850toPOXML.jar

   The Select Import JAR File dialog box is displayed.

   Figure 6-10 Select Import JAR File Dialog Box

   Click Import.

3. Open the EDI850toPOXML map file and choose File—>Open Map. Then select the EDI850toPOXML map.

4. Export the resulting map to the Power.Server!. Select the Finish tab and click Promote.

   Figure 6-11 Promoting the Finished Map

5. Import the map to convert the Purchase Order Acknowledgment XML to the EDI 855 transaction. Choose File—>Import. From the Select Import JAR window select the following file:

   >     SAMPLES_HOME\integration\samples\edi\POAckXMLtoEDI855.jar

   Click Import.

6. Choose File—>Open Map, then select the POAckXMLtoEDI855 map.

7. Export the resulting map to the Power.Server!. Select the Finish tab and click Promote. Select Move Map to Production and click OK.

8. Import the XML envelope. Choose File—>Import and import the following file:

   >     SAMPLES_HOME\integration\samples\edi\XMLEnvelope.jar

9. Choose File—>Open Document Definition. Then select XMLEnvelope and click OK.

10. Export the result to the Power.Server!. Select the Finish tab and click Promote. Select Move Doc to Production and click OK.

11. Your work in Power.Map! is complete; you can now exit.

Step 4: Set Up the Connections

1. From within Power.Manager!, click Connections. The Connections window is displayed.

   Figure 6-12 List of Power.Manager! Connections

2. Create an RMI connection from WebLogic Integration to Power.Server!. Click the Add New icon: .

   A dialog box for creating a new connection is displayed.

   Figure 6-13 Create New Connection Dialog Box

3. Set the name to WLI_POACK_2_POWERSERVER, Transport to RMI, and Direction to Source. Click OK.

   A dialog box for setting the inbound RMI properties is displayed.

   Figure 6-14 Inbound RMI Properties

4. Set Status to Active and Envelope Recognition BDD to XMLEnvelope, then click OK.

5. Create an RMI connection from Power.Server! to WebLogic Integration. Click the Add New icon: .

6. Set the name to POWERSERVER_2_WLI_PO, Transport to RMI, and Direction to Target. Click OK.

   A dialog box for setting the outbound RMI properties is displayed.

   Figure 6-15 Outbound RMI Properties

7. Set Status to Active, Target to localhost, and Service Name to PO, then click OK.

8. Create an inbound file connection. Click the Add New icon: .

9. Set the name to EDIFILE_2_POWERSERVER, Transport to File, and Direction to Source. Click OK.

   A dialog box for setting the inbound file properties is displayed

   Figure 6-16 Inbound File Properties

   Set the following properties:

   - Status: Active

   - Envelope Recognition BDD: X12

   - Directory Path: SAMPLES_HOME\integration\samples\edi

   - Filename: EDIPurchaseOrder.txt

   - Do not set any other options.

   Click OK when you are finished.

10. Create an outbound file connection. Click the Add New icon: .

11. Set the name to POWERSERVER_2_EDIFILE, Transport to File, and Direction to Target. Click OK.

    A dialog box for setting the outbound file properties is displayed.

    Figure 6-17 Outbound File Properties

    Set the following properties:

    - Status: Active

    - Directory Path: SAMPLES_HOME\integration\samples\edi

    - Auto-generate File Name: Select this option.

    - Do not set any other options.

    Click OK when you are finished.

Step 5: Set Up the Exchange Profiles

1. From within Power.Manager!, select Exchange Profiles.

   The window in which exchange profiles are listed is displayed.

   Figure 6-18 Power.Manager! Exchange Profiles List

2. Set up the inbound EDI exchange profile. Click the Add New icon.

   The New Exchange Profile dialog box is displayed.

   Figure 6-19 New Exchange Profile Dialog Box

3. Set the following properties:

   - Map Name: EDI850toPOXML

   - Source Connection: EDIFILE_2_POWERSERVER

   - Target Connection: POWERSERVER_2_WLI_PO

   - Profile Status: Active

   - Partner Company: AES

   - Role: Sender

   - Identifier: ISASNDR99

   - On Compliance Error: Reject Document

   - Do not set any other options.

   Click OK when you are finished.

4. Set up the outbound EDI exchange profile. Click the Add New icon: .

5. Set the following properties:

   - Map Name: POAckXMLtoEDI855

   - Source Connection: WLI_POACK_2_POWERSERVER

   - Target Connection: POWERSERVER_2_EDIFILE

   - Profile Status: Active

   - Partner Company: AES

   - Role: Receiver

   - Identifier: ISASNDR99

   - On Compliance Error: Reject Document

   - Do not set any other options.

   Click OK when you are finished.

Step 6: Set Up the Workflow

Note: If you have executed the Run Samples setup, as discussed in "Preparing to Run the Samples" in "Getting Started" in Running the B2B Integration Samples, you can skip this step and proceed to Step 7: Deploy the Application View.

1. Start WebLogic Server: choose Start—>Programs—>BEA WebLogic E-Business Platform—>WebLogic Integration 7.0—>Samples—>Start Server.

2. Start the WebLogic Integration Studio: choose Start—>Programs—>BEA WebLogic E-Business Platform—>WebLogic Integration 7.0—>Start Studio.

3. Log on to the WebLogic Integration Studio. The default login for the samples is:

   - User ID: joe

   - Password: password

4. Choose Tools—>Import Package.

5. Select the file EDISampleWorkflow.jar, located in SAMPLES_HOME\integration\samples\edi.

   Figure 6-20 Importing the EDI Workflow

6. Select Activate Workflows After Import. If prompted, use Org1.

Step 7: Deploy the Application View

1. Start a Web browser.

2. Connect to http://localhost:7001/wlai.

3. Log in using the system login ID:

   - ID: system

   - Password: security

   Alternately, create a new user using the application integration functionality provided by WebLogic Integration. Then log in as that user.

4. Select the Application View EDIAppView.

5. Click Edit.

6. Proceed to deploy EDIAppView.

You have now finished configuring the EDI sample.

Step 8: Run the Sample

There are two ways to launch the sample:

- You can run a script from the directory in which Power.Commerce! is installed. In a command prompt window, run the following command line:

>     power_enterprise_dir\powerit\powerapi\file_request -c
>     EDIFILE_2_POWERSERVER

- You can start the sample from the samples launcher page, as discussed in Running the B2B Integration Samples.

Figure 6-21 Samples Launcher Page

You can monitor the sample during its execution from within Power.Manager!:

- To track sessions in progress, choose Tracking—>Session—>Search. Then search for Any Status, Any Connection to find your sample session.

- To track documents through the system, choose Tracking—>Documents—>Search. Then set all of the search parameters to Any to find the broadest set of documents.

You can also monitor the sample from within the WebLogic Integration Studio:

- From within the WebLogic Integration Studio, select the EDISample Instance, then double-click the instance that you have run, and examine the variables.

To verify that the sample has run correctly, go to SAMPLES_HOME\integration\samples\edi. You should see a new file in the directory, which is autocreated by Power.Server! when the EDI message completes the cycle.