BEA Home | Events | Solutions | Partners | Products | Services | Download | Developer Center | WebSUPPORT
JAM Documentation | JAM Workflow Processing Guide | Previous Topic | Next Topic | Contents | Index

Example of JAM Integrated with the WebLogic Process Integrator

The BEA WebLogic Java Adapter for Mainframe (JAM) software includes three sample workflows designed to illustrate the way JAM works with WebLogic Process Integrator and WebLogic XML/Non-XML Translator. This section describes these workflow templates and gives you step-by-step instructions for running the example.

Action List

To use this example of JAM working with WebLogic Process Integrator, complete the following tasks.

| Your action... | Refer to...
--- | --- | ---
1 | Set up the mainframe. | Step 1: Setting up the Mainframe
2 | Configure and run WebLogic Process Integrator. | Step 2: Configure and Run WebLogic Process Integrator using WebLogic Server
3 | Create the workflow templates and import the template definitions. | Step 3: Create the Templates and Import the Template Definitions
4 | Open and activate the workflow template. | Step 4: Open and Activate the Template
5 | Execute the workflow. | Step 5: Executing the Workflow

Prerequisites

Before you can run the JAM/WebLogic Process Integrator scenarios, make sure the following tasks have been completed:

| Prerequisites | Resources
--- | --- | ---
1 | Install and configure WebLogic Server for your system. | BEA WebLogic Server Installation Guide
2 | Install and configure WebLogic Process Integrator for your system. | BEA WebLogic Process Integrator Installation Guide
3 | Install and configure WebLogic XML/Non-XML Translator for your system. | BEA WebLogic XML/Non-XML Installation Guide
4 | Install and configure JAM for your system. | BEA WebLogic Java Adapter for Mainframe Installation Guide and BEA WebLogic Java Adapter for Mainframe Configuration and Administration Guide
5 | Read the Release Notes for each product to become familiar with any special requirements. | BEA WebLogic product documentation

Note: The instructions presented in this section assume that you have a good working knowledge of BEA WebLogic Process Integrator, BEA WebLogic Server, and BEA XML/Non-XML Translator. You should have successfully installed WebLogic Process Integrator and run a sample workflow prior to running these samples.

Running the WebLogic Process Integrator/JAM Example

This example simulates storage and retrieval of employee records in a mainframe database initiated by workflow processing. The data is entered from a worklist form and translated to XML. The data is then translated to COBOL copybook format and stored in the data base. The employee record can then be retrieved from the database into the workflow. Examples of COBOL mainframe applications (dpldemoc.cbl, dpldemor.cbl, dpldemou.cbl, and dpldemod.cbl) can be extracted from the sample.jar file in the sample directory located in the <JAM Installation>\examples directory.

Files for the WebLogic Process Integrator/JAM Example

Table 3-1 describes the files used in the examples. These files are located in the samples.jar in the JAM installation directory.

Table 3-1 List of WebLogic Process Integrator/JAM Sample Files

Directory

File

Description

sample/wlpi

jcrmgw2.cfg

Configuration file for the JAM Gateway

sample/wlpi

create.xml

Workflow that creates an employee record

sample/wlpi

read.xml

Workflow that reads an employee record

sample/wlpi

readString.xml

Workflow that reads as employee record using string data type

sample/wlpi

emprec.cpy

Copybook for the employee record

sample

dpldemoc.cbl, dpldemor.cbl, dpldemou.cbl, and dpldemod.cbl

Mainframe files

How to Run the WebLogic Process Integrator/JAM Example

Follow the steps below to run the WebLogic Process Integrator/JAM example. For specific instructions on performing the tasks in WebLogic Process Integrator, WebLogic XML/Non-XML Translator, and WebLogic Server, please refer to the documentation that accompanies those applications.

Step 1: Setting up the Mainframe

- Set up the mainframe programs. COBOL copybooks such as dpldemoc.cbl, dpldemor.cbl, dpldemou.cbl, and dpldemod.cbl are examples of the types of programs that you might use.

Step 2: Configure and Run WebLogic Process Integrator using WebLogic Server

1. Move the jcrmgw.cfg file from the sample directory to: <BEA.Home>/<install.dir>/config/<domain.name>

2. Edit the sample jcrmgw.cfg file, providing the address and port to work with the Communications Resource Manager (CRM).

3. Start the WebLogic Process Integrator Server.

4. Run WebLogic Process Integrator Studio.

5. Import the emprec.cpy copybook using WebLogic XML/Non-XML Translator Format Builder and store it in the repository as described in the "Using Mainframe Applications with Workflows" section of this guide.

Step 3: Create the Templates and Import the Template Definitions

This example provides three workflow templates for you to work with. The templates are listed and described in Table 3-2

Table 3-2 Provided Workflow Templates

Workflow Template | File Name | Description
--- | --- | ---
JAM create | create.xml | Creates an employee record
JAM read | read.xml | Reads an employee record
JAM readString | readString.xml | Reads and employee record using string data type

To create the template and import the template definition for JAM create:

1. Create a new template called JAM create.

2. Select the template from the tree view in the left pane and click the right mouse button.

3. Choose Import Template Definition.

4. Select the corresponding definition file: create.xml.

5. Click OK to close the message box.

6. Repeat steps 1 through 5 for:

- JAM read from the definition file read.xml

- JAM readString from the definition file readString.xml

Step 4: Open and Activate the Template

To enable each workflow template, open and activate the template using the following steps:

1. Select the JAM create template definition imported in the previous step from the tree view and click the right mouse button.

2. Choose Open. The workflow created for this sample application displays, as shown in Figure 3-1.

Figure 3-1 Workflow for JAM create

3. Select the JAM create template definition again from the tree view and click the right mouse button.

4. Choose Properties. The Template Definition properties dialog box displays, as shown in Figure 3-2.

   Figure 3-2 Template Definition create

5. Click Active to activate the template and click OK.

6. Select the JAM create template definition a third time from the tree view and click the right mouse button again.

7. Choose Save to save the template definition with the changes you made.

8. Repeat Steps 1 through 7 for JAM read and JAM readString.

Step 5: Executing the Workflow

This section provides step-by-step instructions for executing workflows to create an employee record and to read an employee record.

Execute the JAM create Workflow

The JAM create workflow creates an employee record. To start the workflow from the Weblogic Process Integrator Worklist, complete the following steps:

1. Start WebLogic Process Integrator Worklist and choose Workflow |Start a Workflow.

2. Select JAM create. The template opens and the first task is displayed, as shown in Figure 3-3.

Figure 3-3 JAM create Worklist

3. Select the Enter Customer Info task and click the right mouse button.

4. Select Execute. The Enter Customer Info dialog displays, as shown in Figure 3-4.

   Figure 3-4 Data Entry Form

5. Enter the employee information and click OK. The task is started and the workflow runs.

6. A new task, Notify Creator will appear on the worklist, as shown in Figure 3-5. Select the Notify Creator task.

   Figure 3-5 Notify Creator Task

7. Select Execute. When the Information dialog appears, as shown in Figure 3-6, click OK to close the dialog box. The workflow is now complete.

   Figure 3-6 Information Dialog Window

Execute the JAM read and JAM readString Workflow

The JAM read and JAM readString workflows read and display an employee record for the mainframe database. The JAM readString workflow is functionally the same as the JAM read workflow. The difference is that the JAM readString workflow uses String variables internally to contain the XML used for data translation.

To execute these workflows from the WebLogic Process Integrator Worklist, complete the following steps:

1. Start WebLogic Process Integrator Worklist and choose Workflow|Start a Workflow.

2. Select JAM read or JAM readString. The template opens, as shown in Figure 3-7 and the first task is displayed.

Figure 3-7 JAM read or JAM readString Workflow

3. Select the Enter Query task, as shown in Figure 3-8, and click the right mouse button.

   Figure 3-8 JAM read or JAM readString Worklist

4. Select Execute. The Data entry form dialog box displays, as shown in Figure 3-9.

   Figure 3-9 Data Entry Form

5. Enter the last name of the employee to be read. For example, the last name entered when you created an employee record was Smith. Click OK.

6. A new task, Display Customer Information, will appear on the worklist. Select the Display Customer Information task, as shown in Figure 3-10.

   Figure 3-10 Notify Creator Task

7. Select Execute. When the Information dialog box appears, as shown in Figure 3-11, click OK to close the dialog box. The workflow is now complete.

   Figure 3-11 Information Dialog Window

Copyright © 2001 BEA Systems, Inc. All rights reserved. Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.