|
|
|
|
|
Using BEA WebLogic Process Integrator with JAM
WebLogic Process Integrator is a process modeling tool and workflow environment that combines the functions of static data and server administration, workflow definition, and workflow monitoring.
WebLogic Process Integrator may be used with JAM to provide the following key features:
This section discusses the following topics:
WebLogic Process Integrator Overview
WebLogic Process Integrator is a Java implementation of a workflow management system. A workflow management system has been defined as one that "defines, manages, and executes workflows through the execution of software whose order of execution is driven by a computer representation of the workflow logic."
Such a system automates a business process by merging the sequence of activities and invoking the appropriate resources required by the various activities or steps. Individual business processes may have life cycles ranging from minutes to days (or longer), depending on the complexity and duration of the various constituent activities. To achieve this, a workflow management system must provide support in four broad functional areas:
WebLogic Process Integrator Architecture
At the center of the WebLogic Process Integrator architecture is the Process Engine, which serves as the run-time controller and is responsible for keeping track of workflow instances and managing the execution of workflows. The high-performance WebLogic Process Integrator workflow engine has been developed using a breakthrough embedded workflow-enabling approach that is written in 100% pure Java.
The WebLogic Process Integrator data and server administration facility allows users to administer components of the WebLogic Process Integrator server and database. More specifically, it allows users to maintain functions such as adding, updating, deleting users, roles, and organizations; disconnecting users and shutting down the server, rerouting tasks from one user to another, and creating calendars that are used in workflow definition.
The WebLogic Process Integrator workflow definition facility allows users to graphically create and edit workflows, mapping out the tasks in the workflow and the business rules that must be followed. Workflow definitions are used as templates, which can be used to create multiple workflow instances.
The WebLogic Process Integrator workflow monitor facility allows users to monitor and modify workflows. More specifically, it allows users to perform functions such as displaying the status of workflow instances, modifying the tasks associated with a workflow instance (for example, re-assigning work tasks or forcing work to be re-done), creating a variety of customized reports on workload and statistical data, and viewing a user or role worklist in order to dynamically maintain workflows.
Finally, the WebLogic Process Integrator worklist facility provides users with a list of tasks describing work currently assigned to them (or the roles to which they belong) and provides the means for users to select and perform those tasks.
The following diagram illustrates the WebLogic Process Integrator architecture.
Figure 8-1 WebLogic Process Integrator Architecture
Integration with JAM
When using WebLogic Process Integrator with JAM, the WebLogic Process Integrator functions vary depending upon the type of request:
JAM's mechanisms for implementing both WebLogic Process Integrator to mainframe and mainframe to WebLogic Process Integrator requests have been tailored to the capabilities of WebLogic Process Integrator. WebLogic Process Integrator to mainframe requests make use of an object-based interface. Mainframe to WebLogic Process Integrator requests make use of an XML event interface.
The WebLogic Process Integrator configuration for JAM requires several steps to transfer dataview objects to and from the mainframe. A dataview object, a data helper object, and a session object must be created. The dataview object is first instatiated through a business operation for a java class. The instantiated dataview object is then passed as a parameter to a datahelper method that permits set operations to be performed. On set operations the datahelper object updates the dataview object. An EJB session variable, which is a new WebLogic Process Integrator data type, is instantiated with an ApplicationView.create() call. Finally, an EJB method call to the invoke() method is made using the session variable for the EJB instance. The service name and the dataview are passed as parameters.
WebLogic Process Integrator to Mainframe Requests
WebLogic Process Integrator to mainframe requests are the most frequent type of communication. In a WebLogic Process Integrator to mainframe request, a workflow requires a service from the mainframe application. The invocation of a mainframe application is essentially a two step process: the input message required by the remote application is created and the service is invoked.
JAM facilitates this interaction with the following tools:
The eGen portion of JAM can generate an additional class that is required to facilitate data creation within a workflow. This additional class is generically known as a "document holder." The document being held is the message required for the mainframe service. eGen creates a document holder as part of the code generation from the mainframe COBOL copybook.
JAM also uses an EJB, called ApplicationView, that matches the WebLogic Process Integrator service invocation with the eGen client that packages the service request for the JAM gateway.
Using the eGen COBOL Utility for WebLogic Process Integrator to Mainframe Requests
The general process for using JAM with WebLogic Process Integrator for WebLogic Process Integrator to mainframe requests is to run the eGen COBOL utility with the mainframe COBOL copybook and the support xml keywords in the egen script. This process results in the standard eGen/JAM output of java source for client and dataview. The following new outputs are provided:
The compiled version of the document holder is provided to the workflow developer, while the client and dataview is deployed in the WebLogic server the way JAM clients currently are deployed. Both the dataview and document holder classes must be compiled and deployed in the WebLogic Server where WebLogic Process Integrator is installed and these classes must be on the WEBLOGICCLASSPATH for WebLogic Server 5.1 and the CLASSPATH for WebLogic Server 6.0. Refer to Developing Java Applications for further details on developing and deploying applications using JAM.
Workflow Development for WebLogic Process Integrator to Mainframe Requests
The document holder provides the workflow developer with methods to instantiate and populate a document object for use in a mainframe service request.
Following is the general sequence of activities for workflow development:
This general process could encompass a large number of workflow operations depending on the complexity of the data. The workflow could be manually started, in which case the factory invocation could be specified in a start node. The workflow could be initiated by an XML event where the event provided the input data to populate the document object for use in the mainframe request.
The general process for using JAM with WebLogic Process Integrator for WebLogic Process Integrator to mainframe requests is illustrated in the following diagram.
Figure 8-2 WebLogic Process Integrator to Mainframe Requests from WebLogic Process Integrator
In the above figure, the Document Holder is a lightweight class for use with WebLogic Process Integrator operations. It provides a document factory for creating new document instances. The document instance is passed in to the document holder constructor when the document holder methods are used as WebLogic Process Integrator business operations. Document holder methods forward requests to actual document methods. The actual document is passed on an application view service call.
Mainframe to WebLogic Process Integrator Requests
Mainframe to WebLogic Process Integrator requests to WebLogic Process Integrator are asynchronous requests. An application used to initiate a workflow should be capable of 'request only' processing.
The general process for using JAM with WebLogic Process Integrator for Mainframe to WebLogic Process Integrator requests is illustrated in the following diagram.
Figure 8-3 Mainframe to WebLogic Process Integrator Requests to WebLogic Process Integrator
In the above figure, MyTPName is received from the mainframe. The local service name is obtained from the JCRMGW.CFG file. JAMToJMS is registered in JNDI with the local service name. The JAMToJMS EJB uses a schema name to construct a data view to convert mainframe data into XML. XML is then posted to a JMS topic found in the deployment descriptor.
Example of JAM Application Integrated with WebLogic Process Integrator
This application shows an example of JAM integration with WebLogic Process Integrator. The scenario illustrates the creation of an employee record on the mainframe. This record is then read back into WebLogic Process Integrator and selected fields are extracted and stored in WebLogic Process Integrator variables. Refer to the JAM and WebLogic Process Integrator documentation for issues of operation and configuration.
This in no way is a complete illustration of WebLogic Process Integrator usage, but it does provide a starting point for constructing real workflows that interact with a JAM gateway using eGen client EJB's. Refer to your WebLogic Process Integrator documentation for detailed information about using WebLogic Process Integrator.
Note: Integration of JAM with WebLogic Process Integrator as shown in this example only works with WebLogic Process Integrator 1.2.1 and WebLogic Server 5.1.
Task 1: Define Business Operations for the Create Employee Record Example
For this task, you will define the business operations required to create an employee record.
Note: You must have used eGen COBOL to generate both your dataview and helper class, compiled the generated code, and deployed them on the classpath for the instance of WebLogic Server that is running WebLogic Process Integrator before you can define your business operations.
Step 1: Set Up Create New Employee Record Object
Refer to "Defining a Business Operation" in the BEA WebLogic Process Integrator Studio Guide for detailed information about setting up Business Operations.
Perform the following steps to set up your first business operation:
Enter the Java Class Name here. For this sample application the Java Class Name is empRecDataHelper.
This is the fully qualified class name including the complete package name as specified in the eGen script that created the data helper class. In this example, a package was not specified in the eGen script, so no package is required in this dialog box. The class specified here must be located on the WebLogic Server CLASSPATH.
The Define Business Operation dialog box has a pull-down list of all of the available Java class methods that can be called when the business operation is invoked. In this example, select the Data Factory method named newXml, which is the default constructor type method for this sample application. This method must be used first in the workflow to create a new empRecData object that can then be used for the other business operations.
Once again specify the empRecDataHelper class, but this time select the method named empRecDataHelper(java.lang.Object o) from the pull-down list.
This time you will need to specify a name for the method parameter. Select the parameter from the Parameters list in the lower half of the dialog box and then click the Update button. Name the parameter dataview.
Click OK to complete the definition.
Step 2: Set Up Data Accessor Business Operations
In this step, you will set up additional business operations for accessing the data required to create an employee record. When you are through, you will have a list of business operations similar to the following:
Definine a new business operation to access data for the employee's first name:
|
Fully Qualified Java Class Name |
Business Operation Name |
Method to Call |
|---|---|---|
|
empRecDataHelper |
GetFirstName |
getEmpNameFirst |
|
empRecDataHelper |
GetMiddleInitial |
getEmpNameMI |
|
empRecDataHelper |
GetLastName |
getEmpNameLast |
|
empRecDataHelper |
GetSSN |
getEmpSsn |
|
empRecDataHelper |
GetState |
getEmpAddrST |
|
empRecDataHelper |
GetStreet |
getEmpAddrStreet |
|
empRecDataHelper |
GetZipCode |
getEmpAddrZip |
|
empRecDataHelper |
SetFirstName |
setEmpNameFirst |
|
empRecDataHelper |
SetMiddleInitial |
setEmpNameMI |
|
empRecDataHelper |
SetLastName |
setEmpNameLast |
|
empRecDataHelper |
SetSSN |
setEmpSsn |
|
empRecDataHelper |
SetState |
setEmpAddrST |
|
empRecDataHelper |
SetStreet |
setEmpAddrStreet |
|
empRecDataHelper |
SetZipCode |
setEmpAddrZip |
Step 3: Set Up ApplicationView Business Operations
In this step, you will define the business operations necessary to access the ApplicationView EJB to invoke a mainframe operation.
Begin by defining a business operation that acquires access to an instance of the ApplicationView session EJB:
Continue by defining a business operation that uses an ApplicationView session EJB to invoke a service on the mainframe:
Task 2: Set Up a Workflow Template
Now a workflow template can be defined to make use of the business operations set up in Task 1: Define Business Operations for the Create Employee Record Example. Refer to the BEA WebLogic Process Integrator Studio Guide for detailed information about setting up workflows.
Use the following guidelines to set up your workflow for creating an employee record:
Task 3: Define Variables
In this task, you will define variables to be used in your workflow.
Task 4: Define the Start Node
In this task, you will modify and define properties for the Start node to create an employee record and helper objects.
This completes the Start node.
Task 5: Create a Task to Set Up an Employee Name
Actions can now be added as tasks to your Create Employee Records workflow. You may add as many tasks as you need to complete your process. In this example, the first task, Set Up Name, is created and several business operations are used to set values in the various fields that make up the name.
Specify the emRecHelper (object) as the Instance Variable.
For this example, enter the last name in the Expression text box and select the Literals option. The name could have been obtained in any manner and used from a variable or other source.
Click OK to return to the Perform Business Operation dialog.
Task 6: Create a Task to Set Up the Employee Address
A second task to set up the employee address is created and added to the Create Employee Records workflow.
Task 7: Create Additional Tasks to Complete the Employee Record
Set up the following additional tasks similarly to the steps described in Task 5: Create a Task to Set Up an Employee Name:
Refer to your WebLogic Process Integrator documentation for more detailed information about using WebLogic Process Integrator Studio.
Following is a brief description of each additional task:
This task contains two actions. The first acquires access to an ApplicationView through use of the Create ApplicationView EJB Business Operation and the second invokes the mainframe service through the use of the Create mainframe employee record Business Operation.
After you finish setting up your workflow, you can execute it. Refer to your BEA WebLogic Process Integrator documentation for detailed information about starting a workflow.
|
|
|
|
|
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|