![]() |
![]() |
|
|
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 Purchase Order sample. 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 Process Integrator and BEA WebLogic Server. You should have successfully installed WebLogic Process Integrator and run a sample workflow prior to running the Purchase Order sample.
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, a generated XML file may be posted to a JMS topic to act as a starting event for a WebLogic Process Integrator workflow.
Note: This sample does not require the interface to WebLogic Process Integrator; however, in order to start the workflow, WebLogic Process Integrator is required.
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 This section describes the steps required to run the Servlet Sample. Follow the instructions appropriate for your WebLogic Server version (5.1 or 6.0). For instructions on the tasks specific to WebLogic Server and WebLogic Process Integrator, refer to the documentation that accompanies those applications. Using WebLogic 5.1 To run the servlet sample stand-alone (without WebLogic Process Integrator):
weblogic.httpd.webApp.WLXT=<path to war file>/WLPI_sample.war
Note: If you have both WebLogic Server and WebLogic Process Integrator installed, you may have two instances of the weblogic.properties file. Make sure you edit the file in the WebLogic Process Integrator directory for this sample exercise.
http://<weblogic server>:<weblogic port>/WLXT/WLXTTest
The following additional steps can be run to start the workflow if you are integrating with WebLogic Process Integrator:
http://<weblogic server/port>/WLXT/WLXTTest
samples\wlpi\SampleData.xml
samples\wlpi\SampleData.data
Using WebLogic 6.0
To run the servlet sample stand-alone (without 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)
Figure 2-1 WebLogic Server Console
Note: Do not select the file you copied to the applications directory in step 3.
After the WLPI_sample.war file is successfully uploaded, WLPI_sample appears in the tree under Web Applications.
Figure 2-2 WebLogic Server Console Targets Tab
http://<host>:<port>/WLPI_sample/WLXTTest
The following additional steps can be run to start the workflow if you are integrating with WebLogic Process Integrator:
Figure 2-3 WebLogic Server Console Mail Session Configuration Tab
Figure 2-4 WebLogic Server Console Mail Session Targets Tab
http://<weblogic server/port>/WLXT/WLXTTest
samples\wlpi\SampleData.xml
samples\wlpi\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 using WebLogic Server 5.1 Note: If you are running WebLogic Process Integrator under WebLogic Server 5.1, follow the steps below. If you are running WebLogic Process Integrator under WebLogic Server 6.0, proceed to Step 2. Configure and Run WebLogic Process Integrator using WebLogic Server 6.0.
weblogic.ejb.deploy=d:/beahome/wlxt1.0/samples/ejb/lib/WLXTEJB51.jar
xmlx.jar
dom2.jar
sax2.jar
ebase.jar
wlxt.jar
Step 2. Configure and Run WebLogic Process Integrator using WebLogic Server 6.0
<EJBComponent
Name="wlxt-sample"
Targets="<your_machine_name>"
URI="WLXTEJB60.jar"
/>
Figure 2-5 shows an example of the Application section of the config.xml file with the above lines added.
Figure 2-5 Sample config.xml file
xmlx.jar
dom2.jar
sax2.jar
ebase.jar
wlxt.jar$BEA_Home/wlserver60
Step 2. Create the Business Operations for the Workflow
You need to create seven business operations for the sample. These business operations are referenced by the sample workflow; therefore, their names must exactly match the list below.
Notes: The names of these operations must exactly match the above list. Business operation names are case-sensitive.
To create the business operations:
Figure 2-6 Create XML/nonXML Translation Bean Business Operation
Figure 2-7 Create Example HR Bean Business Operation
Figure 2-8 Get Employee Info Business Operation
Figure 2-9 Translate Binary to XML Business Operation
Figure 2-10 Create Example Payroll Bean Business Operation
Figure 2-11 Post Payroll Data Business Operation
Figure 2-12 Translate XML to Binary Business Operation
The following dialog shows a list of the completed business operations. Figure 2-13 List of Completed Business Operations
Step 3. Create the Template and Import the Template Definition
To create the template and import the template definition:
Figure 2-14 Import Message
Figure 2-15 Import Confirmation Message
Step 4. Open and Activate the Template
To open and activate the template:
Figure 2-15 Workflow for WLXT Example
Figure 2-16 Template Definition
Step 5. 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 2-17 WLXT Example Worklist
Figure 2-18 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:
Autopay 1 2000-11-30 60
Figure 2-19 shows the WebLogic Process Integrator output from executing the workflow.
Figure 2-19 WebLogic Process Integrator Server Console
![]() |
![]() |
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|