Skip Headers

Oracle Workflow Administrator's Guide
Release 2.6.3.5

Part Number B12160-02
Previous Next       Contents Index Glossary
         Previous  Next          Contents  Index  Glossary

Step 16 Setting Up the Java Function Activity Agent

To execute external Java function activities, you must set up the Java Function Activity Agent. This functionality is currently only available for the standalone version of Oracle Workflow. The Java Function Activity Agent dequeues the messages related to external Java activities from the 'Outbound' queue for external function processing, calls the appropriate Java functions, and places the results on the 'Inbound' queue for external function processing.

Note: These 'Outbound' and 'Inbound' queues are separate from the queues used for the Business Event System. See: Setting Up Background Workflow Engines and Workflow Queue APIs, Oracle Workflow API Reference.

After a Java function completes, you must run a background engine to process the 'Inbound' queue and complete the function activity. See: Setting Up Background Engines.

Some standard Workflow activities are external Java function activities and require the Java Function Activity Agent. You can also define your own external Java function activities. See: Standard Activities, Oracle Workflow Developer's Guide, To Create a Function Activity, Oracle Workflow Developer's Guide, and Standard API for Java Procedures Called by Function Activities, Oracle Workflow Developer's Guide.

To run the Java Function Activity Agent, you must have Java Development Kit (JDK) Version 1.4 installed.

Note: The Java Runtime Environment is available for download from: http://www.javasoft.com

Starting the Java Function Activity Agent

If you are using the standalone version of Oracle Workflow, you can run scripts provided by Oracle Workflow to start the Java Function Activity agent. You can also start the agent manually.

When you start the Java Function Activity Agent, you must specify the user name of your Oracle Workflow database account and the database connect string. You can also optionally specify the character set and the JDBC driver type that you want to use.

After starting, the Java Function Activity Agent prompts you to enter the password for your Oracle Workflow database account.

You use different commands to start the agent depending on whether you are running it from a script or manually, and which platform you are running it on.

Starting the Java Function Activity Agent From a Script

You can run scripts called wfjvlsnr.csh or wfjvlsnr.bat to start the Java Function Activity Agent on UNIX or on Windows, respectively. These scripts are located on your server in the Oracle Workflow admin subdirectory.

If you define your own external Java function activities, you must edit the scripts to include the path to the JAR files containing your custom Java classes. The custom class files should reside on the same platform where the Java Function Activity Agent is run. The Java Function Activity Agent does not need to reside on the same tier as the database, however.

Running the wfjvlsnr.csh Script on UNIX Use the following command to run the wfjvlsnr.csh script on UNIX:

wfjvlsnr.csh "<user_name> <connect_string> [<JDBC_driver>]" [<character_set>]

Replace the parameters in the command as follows:

Note: The connection details, including the user name, connect string, and JDBC driver type, must be enclosed in double quotes to separate them from the character set parameter.

Running the wfjvlsnr.bat Script on Windows Use the following command to run the wfjvlsnr.bat script on Windows:

wfjvlsnr.bat "<user_name> <connect_string> [<JDBC_driver>]" [<character_set>]

Replace the parameters in the command as follows:

Note: The connection details, including the user name, connect string, and JDBC driver type, must be enclosed in double quotes to separate them from the character set parameter.

Starting the Java Function Activity Agent Manually

To start the Java Function Activity Agent manually, run JRE against oracle.apps.fnd.wf.WFFALsnr, specifying your CLASSPATH, the user name of your Oracle Workflow database account, and the database connect string. You can also optionally specify the character set and the JDBC driver type that you want to use.

The CLASSPATH must point to the Java Runtime Environment, the directory containing the Workflow JAR files, the Oracle XML parser, the Oracle JDBC implementation, and the following Workflow JAR files:

Note: In standalone Oracle Workflow, the Workflow JAR files are located in the <ORACLE_HOME>/jlib directory.

If you define your own external Java function activities, you must also include the JAR files containing your custom Java classes in the CLASSPATH. The custom class files should reside on the same platform where the Java Function Activity Agent is run. The Java Function Activity Agent does not need to reside on the same tier as the database, however.

Starting the Java Function Activity Agent on UNIX Use the following command to start the Java Function Activity Agent on UNIX:

jre -classpath "$<JREPATH>/rt.jar:$<Workflow_JAR_file_directory>:
$<Workflow_JAR_file_directory>/wfjava.jar:$<ORACLE_HOME>/wf/
xml/java/lib/xmlparserv2.jar:$<Workflow_JAR_file_directory>/wfapi.jar:$<ORACLE_HOME>/jdbc/lib/classes111.zip:
$<Workflow_JAR_file_directory>/<Share_JAR_file>:
$<Workflow_JAR_file_directory>/<Ewt_JAR_file>:
$<Workflow_JAR_file_directory>/<Swing_JAR_file>:
$<Workflow_JAR_file_directory>/fndctx.jar:" [-DCHARSET=<character_set>] oracle.apps.fnd.wf.WFFALsnr <user_name> <connect_string> [<JDBC_driver>]

In this command, you can optionally use the -DCHARSET option to specify the character set that you want to use. If you do not specify a character set, Oracle Workflow uses UTF8 by default.

Replace the parameters in the command as follows:

Starting the Java Function Activity Agent on Windows Use the following command to start the Java Function Activity Agent on Windows:

jre -classpath ";<JREPATH>\rt.jar;<Workflow_JAR_file_directory>;
<Workflow_JAR_file_directory>\wfjava.jar;<ORACLE_HOME>\wf\
xml\java\lib\xmlparserv2.jar;<Workflow_JAR_file_directory>\
wfapi.jar;<ORACLE_HOME>\jdbc\lib\classes111.zip;
<Workflow_JAR_file_directory>\<Share_JAR_file>;
<Workflow_JAR_file_directory>\<Ewt_JAR_file>;
<Workflow_JAR_file_directory>\<Swing_JAR_file>;
<Workflow_JAR_file_directory>\fndctx.jar;"
-nojit [-DCHARSET=<character_set>]
oracle.apps.fnd.wf.WFFALsnr <user_name> <connect_string> [<JDBC_driver>]

In this command, you can optionally use the -DCHARSET option to specify the character set that you want to use. If you do not specify a character set, Oracle Workflow uses UTF8 by default.

Replace the parameters in the command as follows:

Stopping the Java Function Activity Agent

Normally, the Java Function Activity Agent runs as a perpetual job. However, you can stop the agent by running a script called wfjvstop.sql, located in the admin/sql subdirectory on your Oracle Workflow server. This script places a stop message on the 'Outbound' queue. See: wfjvstop.sql.

Note: If you are running more than one Java Function Activity Agent simultaneously, you must run the wfjvstop.sql script once for each Java Function Activity Agent.


         Previous  Next          Contents  Index  Glossary



Oracle Logo
Copyright © 2003, 2004, Oracle. All rights reserved.