|
|
Running the WebLogic Process Integrator Sample Applications
The BEA WebLogic XML/Non-XML Translator software includes two sample applications designed to illustrate the integration of XML Translator with BEA WebLogic Process Integrator. This section describes these samples and gives you step-by-step instructions for running the samples. The following topics are discussed:
Prerequisite Considerations
There are certain software applications that must be installed and tasks that must be performed prior to running the these samples. Please refer to the BEA WebLogic XML/Non-XML Translator Release Notes for more information.
Note: The instructions presented in this section assume that you have a good working knowledge of BEA WebLogic Integration, specifically the WebLogic Process Integrator component, and BEA WebLogic Server. You should have successfully installed the WebLogic Process Integrator component of WebLogic Integration and run a sample workflow prior to running the sample applications.
Running the WebLogic Process Integrator Servlet Sample
This sample application implements a Web Archive (WLPI_sample.war) that installs a servlet to accept requests for conversion of binary data to XML. The servlet is accessed via a browser and responds by displaying the generated XML data. In addition, the data is posted to the WebLogic Process Integrator event topic in either XML or binary format. The data may then be used to start a WebLogic Process Integrator workflow.
What is Included in the Servlet Sample
The following table provides a listing and description of the files included in the WebLogic Process Integrator Servlet sample application. This sample application can be found in the samples\wpli\servlet directory.
How to Run the Servlet Sample
Follow the steps below to run the servlet sample. For instructions on the tasks specific to WebLogic Server and WebLogic Process Integrator, refer to the documentation that accompanies those applications.
Step 1. Configure and Run WebLogic Process Integrator
C:\bea\wlserver6.0\config\mydomain\applications (for Windows NT or Windows 2000)
$BEA_HOME/wlserver6.0/config/mydomain/applications (for Unix)
Step 2. Deploy the Web Application
Figure 3-1 WebLogic Server Console
After the WLPI_sample.war file is successfully uploaded, WLPI_sample appears in the tree under Web Applications.
Figure 3-2 WebLogic Server Console Targets Tab
Step 3. Configure the Mail Session
Figure 3-3 WebLogic Server Console Mail Session Configuration Tab
Figure 3-4 WebLogic Server Console Mail Session Targets Tab
Step 4. Create a New Template and Activate the Workflow
Step 5. Store the SampleData.mfl File in the Repository
There are two methods for storing files in the repository. Both methods are described below.
Using Format Builder
Using the command line
At the console command prompt, invoke the Batch Import Utility using the following command.
java com.bea.wlxt.repository.Import [-v] [-n] [-t type] [-f folder] files...
The following information describes the commands and their options.
Step 6. Generate the XML Data and Send the Message
http://<weblogic server/port>/WLPI_sample/WLXTTest
samples\wlpi\servlet\SampleData.data
Running the WebLogic Process Integrator EJB Sample
This sample simulates a dataflow from an HR system to a payroll system, initiated by the entry of payroll data. The employee data is obtained from a legacy payroll system that uses binary data. The data is translated to XML in order to perform a calculation to determine the employee's pay information. The result of the calculation is translated back to binary and sent on to the payroll system.
What is Included in the EJB Sample
The following table provides a listing and description of the files included in the WebLogic Process Integrator EJB sample application. This sample application can be found in the samples\wpli\ejb directory.
How to Run the EJB Sample
Follow the steps below to run the EJB sample. For specific instructions on performing the tasks in WebLogic Process Integrator and WebLogic Server, please refer to the documentation that accompanies those applications.
Step 1. Configure and Run WebLogic Process Integrator
Note: The config directory contains separate subdirectories for each domain you have created. Each of these subdirectories contains its own config.xml file. Make sure you open the file under the correct domain.
<EJBComponent
Name="wlxt-sample"
Targets="<your_machine_name>"
URI="WLXTEJB.jar"
/>
Step 2. Import the Workflow Definition
To import the workflow definition:
Figure 3-5 Import: Select File Dialog
Figure 3-6 Import: Select Components to Import
Figure 3-7 Import: Review Import Summary
Step 3. Open the Template
To open the template:
Figure 3-8 Workflow for XML Translator Example
Figure 3-9 Template Definition
Step 4. Start the Workflow
There are two ways to start the workflow created in the sample:
From the WebLogic Process Integrator Worklist
To start the sample workflow from the Weblogic Process Integrator Worklist:
Figure 3-10 XML Translator Example Worklist
Figure 3-11 Enter Payroll Data
Note: For this example, the employee numbers 1 through 4 are valid. You can enter any period ending date and any number of hours worked.
From the Command Line
To start the sample workflow from a command line prompt:
set WL_HOME=c:\bea\wlserver6.0
Autopay 1 2000-11-30 60
Figure 3-12 shows the WebLogic Process Integrator output from executing the workflow.
Figure 3-12 WebLogic Process Integrator Server Console
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|