![]() |
![]() |
|
|
Using Mainframe Applications with Workflows
BEA WebLogic Java Adapter for Mainframe (JAM) works with BEA WebLogic Process Integrator to access information or applications on the mainframe. This interaction occurs in two different ways:
Action List
To use JAM with WebLogic Process Integrator, you must complete the following tasks.
Prerequisites
Before creating WebLogic Process Integrator workflows with JAM, make sure the following tasks have been completed:
Preparing to Use JAM in Workflow Processing
To use mainframe applications during workflow processing with WebLogic Process Integrator, you must prepare your system. The following tasks must be completed:
This task is required only once.
This task must be completed each time a new COBOL copybook is used.
Task 1: Verifying the JAM Plug-in Setup
The JAM Plug-in is a component that allows the JAM gateway to interact with WebLogic Process Integrator. It runs with WebLogic Process Integrator in the WebLogic Server environment. The JAM Plug-in should have been set up during the JAM installation process.
Warning: Copy the config.xml file and store it in an alternate location as a backup in case the config.xml file you are working with is corrupted during setup.
Listing 2-1 JAM Plug-in Setup
<EJBComponent Name="jampi.jar" Targets="myserver"
URI="jampi.jar"/>
<WebAppComponent Name="com.bea.jam.JamPlugin"
Targets="myserver" URI="jampi.war"/>
The WebLogic Server configuration file (config.xml) is located at:
<bea_home> <install.dir>/config/<domain.name>
In this address:
Listing 2-2 shows an example of this address:
Listing 2-2 Example of config.xml Address
C:/BEA/WLPI/config/wlpidomainexample
Listing 2-3 WebLogic Process Integrator Application Configuration Section of the WebLogic Server config.xml
<Application Deployed="true" Name="WLPI Application" Path="lib">
<EJBComponent Name="wlpi-mdb-ejb.jar" Targets="myserver" URI="wlpi-mdb-ejb.jar"/>
<EJBComponent Name= "repository-ejb.jar"Targets="myserver"URI="repository-ejb.jar"/>
<EJBComponent Name="wlpi-ejb.jar" Targets="myserver"
URI="wlpi-ejb.jar"DeploymentOrder=0/>
<EJBComponent Name="wlxtpi.jar" Targets="myserver" URI="wlxtpi.jar"/>
<WebAppComponent Name= "com.bea.wlxt.WLXTPlugin"Targets="myserver"URI="wlxtpi.war"/>
<EJBComponent Name="jampi.jar" Targets="myserver" URI="jampi.jar"/>
<WebAppComponent Name="com.bea.jam.JamPlugin" Targets="myserver"
URI="jampi.war"/>
</Application>
Task 2: Setting Up Data Translation
To ensure that workflows operate properly, you must set up your system to enable the different software applications to interact. In order for WebLogic XML/Non-XML Translator to convert XML data to the binary format expected by your mainframe program, a description of the binary format must be created and stored in your WebLogic Process Integrator repository. WebLogic XML/Non-XML Translator Format Builder can be used to create this description. Format Builder imports the COBOL copybook for your mainframe application, and automatically creates a description that details the layout of the COBOL copybook. Using this description, WebLogic XML/Non-XML Translator converts instances of this layout to and from XML.
To set up your system for the required data translation, complete the following steps:
Figure 2-1 WebLogic XML/Non-XML Translator
Figure 2-2 WLPI Repository Login
Figure 2-3 WebLogic XML/Non-XML Translator Tools Menu
Figure 2-4 WebLogic XML/Non-XML Translator COBOL Copybook Importer Dialog Box
Figure 2-5 WebLogic XML/Non-XML Translator Store Document Dialog Box
Figure 2-6 Sample XML
Setting Up the Workflow with JAM for Mainframe Services
Determine how your workflow will use mainframe services:
Requesting Mainframe Services from the Workflow
To request mainframe services from WebLogic Process Integrator, you must:
Modify the Gateway Configuration File
The JAM gateway configuration file must have a JC_REMOTE_SERVICE entry for each of the services to be accessed using JAM. This definition must specify the schema that was created in the previous step.
The JAM gateway configuration file is located at:
<bea_home> <install.dir>/config/<domain.name>/jcrmgw.cfg
In this address:
To access mainframe applications from a WebLogic Process Integrator workflow, specify each remote service in the JC_REMOTE_SERVICES section of the JAM gateway (jcrmgw.cfg) file. For specific information about configuring the JAM gateway, refer to the BEA WebLogic Java Adapter for Mainframe Configuration and Administration Guide.
SCHEMA=myemployeerecord
INPUTSCHEMA=myemployeerecordin
INPUTSCHEMA specifies the translation schema for the request sent to the mainframe.
OUTPUTSCHEMA=myemployeerecordout
OUTPUTSCHEMA specifies the translation schema for the response received from the mainframe.
Listing 2-4 is an example of the JC_REMOTE_SERVICES section of the jcrmgw.cfg file.
Listing 2-4 JC_REMOTE_SERVICES Example
#----------------------------------------------------------------
*JC_REMOTE_SERVICES
sampleRead RDOM="CICS4"
RNAME="DPLDEMOR"
TRANTIME=10000
SCHEMA=sample.emprec
sampleUpdate RDOM="CICS4"
RNAME="DPLDEMOU"
TRANTIME=10000
SCHEMA=sample.emprec
sampleCreate RDOM="CICS4"
RNAME="DPLDEMOC"
TRANTIME=10000
SCHEMA=sample.emprec
For specific information about configuring the JAM gateway, refer to the WebLogic Java Adapter for Mainframe Configuration and Administration Guide.
Using Mainframe Actions in Workflows
You can design and edit Mainframe Actions used by WebLogic Process Integrator workflows in the following ways:
Adding Mainframe Actions
Mainframe Actions can be added during design time from the WebLogic Process Integrator Studio Console. The following steps allow you to add a mainframe action:
Figure 2-7 Task Properties
Determine when the action is executed by selecting the appropriate tab defined in Table 2-1.
The BEA WebLogic Process Integrator Studio User Guide provides information about the execution of workflows. Figure 2-8 Adding Mainframe Actions
Figure 2-9 Mainframe Actions Dialog Box
Table 2-2 lists the fields used for adding and updating mainframe actions when using WebLogic Java Adapter for Mainframe (JAM) with a WebLogic Process Integrator workflow. Table 2-2 Mainframe Action Definitions
Updating Mainframe Actions
Mainframe actions can be updated during design time or runtime from the WebLogic Process Integrator Studio Console. The following steps allow you to update a mainframe action:
Deleting a Mainframe Action
To delete a mainframe action:
When an action is deleted, all references to the action are removed. The action is removed from all instances of the workflow, including those currently running.
Changing the Sequence of Mainframe Actions
The sequence of mainframe actions can be changed during design time or run time.
To change the sequence of actions:
Initiating Workflows from the Mainframe
By working with JAM and WebLogic XML/Non-XML Translator, WebLogic Process Integrator workflows can be initiated from mainframe applications. To initiate workflows from the mainframe, you must:
Example of Initiating a Workflow from the Mainframe
In the following example, a new employee record is created on the mainframe. It is sent to the workflow process to be added the employee database.
The screen data is validated and moved into the employee record copybook. This copybook corresponds to the copybook used to generate the MFL in the WebLogic XML/Non-XML Translator Distributed Program Link (DPL).
The COBOL CICS program in Listing 2-5 illustrates how a workflow may be initiated. The CICS link sends the employee record to the workflow. The SYSID directs the LINK to the correct remote environment, and the PROGRAM name corresponds to the RNAME in the jcrmgw.cfg JC_LOCAL_SERVICES entry.
Listing 2-5 Example of Initiating a Workflow From the Mainframe
Modify the Gateway Configuration File
The JAM gateway configuration file must have a JC_LOCAL_SERVICE entry for each of the services in your configuration. This definition must specify the schema that was created when you set up data translation.
To enable the mainframe to initiate a workflow in WebLogic Process Integrator specify each local service in the JC_LOCAL_SERVICES section of the jcrmgw.cfg file. Each JC_LOCAL_SERVICE that is to work within WebLogic Process Integrator must specify JAMToWLPIHome as its name. This name specifies the Home Interface of the EJB delivered with the JAM plug-in. Within the JAMToWLPIHome service, specify the translation schema to be applied to each service using the schema keyword in the following way:
SCHEMA = emprec
Listing 2-6 is an example of the JC_LOCAL_SERVICES section of the jcrmgw.cfg file.
Listing 2-6 JC_LOCAL_SERVICES Example
#----------------------------------------------------------------
*JC_LOCAL_SERVICES
JAMToWLPIHome RNAME='DPL1SVR'
SCHEMA=emprec
For specific information about configuring the JAM gateway, refer to the BEA WebLogic Java Adapter for Mainframe Configuration and Administration Guide.
Edit the Workflow Start Node
For a mainframe event or action to initiate a workflow, it must be included in the Start Node of the WebLogic Process Integrator workflow. To edit the workflow Start Node to initiate the workflow, complete the following steps.
Figure 2-10 Start Node
Figure 2-11 Workflow Variable Assignment Dialog Box
The workflow will be started automatically when data is received from the mainframe.
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|