Skip Headers

Oracle Workflow Administrator's Guide
Release 2.6.4
Part Number B15852-05
Go to Table of Contents
Contents
Go to previous page
Previous
Go to next page
Next

Workflow Administration Scripts

This chapter describes the SQL scripts that workflow administrators can run against an Oracle Workflow server installation.

This chapter covers the following topics:

Workflow Administration SQL Scripts

You can use any of the following administrative scripts to help set up and maintain various features in Oracle Workflow. For the standalone version of Oracle Workflow, the scripts are located on your server in the Oracle Workflow admin/sql subdirectory. For the version of Oracle Workflow embedded in Oracle Applications, the scripts are located in the sql subdirectory under $FND_TOP.

FNDWFPR

For Oracle Workflow embedded in Oracle Applications, use the standard concurrent program FNDWFPR "Purge Obsolete Workflow Runtime Data" to purge old data from the Oracle Workflow tables regularly.

This program purges obsolete runtime information associated with work items, including status information and any associated notifications and Oracle XML Gateway transactions. By default, it also purges obsolete design information, such as activities that are no longer in use and expired ad hoc users and roles, and obsolete runtime information not associated with work items, such as notifications or Oracle XML Gateway transactions that were not handled through a workflow process. You can optionally choose to purge only core runtime information associated with work items for performance gain during periods of high activity, and purge all obsolete information as part of your routine maintenance during periods of low activity.

Navigate to the Submit Requests form in Oracle Applications to submit the Purge Obsolete Workflow Runtime Data concurrent program. When you install and set up Oracle Applications and Oracle Workflow, your system administrator needs to add this concurrent program to a request security group for the responsibility that you want to run this program from. See: Overview of Concurrent Programs and Requests, Oracle Applications System Administrator's Guide and Running Reports and Programs, Oracle Applications User's Guide.

You can supply the following parameters for the Purge Obsolete Workflow Runtime Data concurrent program:

Note: If you are using the version of Oracle Workflow embedded in Oracle Applications and you have implemented Oracle Applications Manager, you can use Oracle Workflow Manager to submit and manage the Purge Obsolete Workflow Runtime Data concurrent program. For more information, please refer to the Oracle Applications Manager online help.

Additionally, in Oracle Applications you can use the Purge Obsolete ECX Data concurrent program to purge Oracle XML Gateway transactions according to Oracle XML Gateway-specific parameters. See: Purge Obsolete ECX Data Concurrent Program, Oracle XML Gateway User's Guide.

WFNLADD.sql

If you enable a new language in your Oracle installation, use WFNLADD.sql to add the missing rows for that language to the Oracle Workflow translation tables. See: Setting Up Additional Languages and wfnlena.sql.

Use the script as follows:

sqlplus <user/pwd> @WFNLADD

Note: The wfnlena.sql and WFNLADD.sql scripts prepare the database for loading workflow definitions in another language. However, these scripts by themselves do not enable displaying Oracle Workflow Web pages in other languages. See: Setting Up Additional Languages.

Wfagtlst.sql

Use wfagtlst.sql to run a PL/SQL agent listener to monitor an agent for inbound event messages. When a message is received, the Event Manager searches for and executes any enabled subscriptions by the local system to the event with a source type of External, and also any enabled subscriptions by the local system to the Any event with a source type of External.

Use the script as follows:

sqlplus <user/pwd> @wfagtlst <agent_name>

Replace <agent_name> with the internal name of the agent that you want to monitor for inbound event messages.

Note: You should use this script primarily for debugging purposes.

Related Topics

Listen, Oracle Workflow API Reference

Wfbesdbg.sql

Use wfbesdbg.sql to display debugging information for an event that you can use to check the status of the event or investigate errors. This script creates an output file named wfevtdbg<event_key>.html, where <event_key> is the event key for a particular instance of the event. The output file displays details about the Business Event System, including the statuses of the local system and agent listeners, details about the definitions of the specified event and any subscriptions to that event, and details about the specified instance of the event if it appears on one of these queues:

Use the script as follows:

sqlplus <user/pwd> @wfbesdbg <event_name> <event_key>

Replace <event_name> with the name of the event and <event_key> with the event key that identifies the particular instance of the event. The event name and event key parameters are case-sensitive.

Note: In Oracle Applications, you can also obtain this information by running the Event Diagnostic Test in Oracle Diagnostics. See: Event Diagnostic Test.

Wfbkg.sql

If you are using the standalone version of Oracle Workflow, you can use wfbkg.sql to start a background engine. This script calls the WF_ENGINE.Background API to run a background engine for the indicated number of minutes. On completing its current set of eligible activities to process, the background process waits for the specified number of seconds before launching another background engine. This cycle continues until the indicated number of minutes have elapsed.

Use the script as follows:

sqlplus <user/pwd> @wfbkg <minutes> <seconds>

Replace <minutes> with the number of minutes you want the background engine to run, and replace <seconds> with the number of seconds you want the background engine to wait between queries.

Related Topics

Background, Oracle Workflow API Reference

Setting up Background Workflow Engines

Wfbkgchk.sql

Use wfbkgchk.sql to get a list of all activities waiting to be processed by the background engine the next time it runs.

Use the script as follows:

sqlplus <user/pwd> @wfbkgchk <WF_schema>

Replace <WF_schema> with the Oracle Workflow schema, usually applsys in Oracle Applications or owf_mgr in standalone Oracle Workflow.

Related Topics

Background, Oracle Workflow API Reference

Setting up Background Workflow Engines

Wfchact.sql

Use wfchact.sql to change the internal name of an activity and update all references to the activity. See: Change the internal name of a workflow object.

Use the script as follows:

sqlplus <user/pwd> @wfchact <act_type> <old_act> <new_act>

Replace <act_type> with the item type that the activity you wish to update is associated with, replace <old_act> with the current internal name of the activity, and replace <new_act> with the new internal name of the activity.

Wfchacta.sql

Use wfchacta.sql to change the internal name of an activity attribute and update all references to the activity attribute. See: Change the internal name of a workflow object.

Use the script as follows:

sqlplus <user/pwd> @wfchacta <act_type> <old_acta> <new_acta>

Replace <act_type> with the item type that the activity attribute you wish to update is associated with, replace <old_acta> with the current internal name of the activity attribute, and replace <new_acta> with the new internal name of the activity attribute.

Wfchita.sql

Use wfchita.sql to change the internal name of an item attribute and update all references to the item attribute. See: Change the internal name of a workflow object.

Use the script as follows:

sqlplus <user/pwd> @wfchita <item_type> <old_attr> <new_attr>

Replace <item_type> with the item type that the item attribute you wish to update is associated with, replace <old_attr> with the current internal name of the item attribute, and replace <new_attr> with the new internal name of the item attribute.

Wfchitt.sql

Use wfchitt.sql to change the internal name of an item type and update all references to the item type. See: Change the internal name of a workflow object.

Use the script as follows:

sqlplus <user/pwd> @wfchitt <old_type> <new_type>

Replace <old_type> with the current internal name of the item type, and replace <new_type> with the new internal name of the item type.

Wfchluc.sql

Use wfchluc.sql to change the internal name of a lookup code and update all references to the lookup code. See: Change the internal name of a workflow object.

Use the script as follows:

sqlplus <user/pwd> @wfchluc <lookup_type> <old_luc> <new_luc>

Replace <lookup_type> with the lookup type of the lookup code you wish to update, replace <old_luc> with the current internal name of the lookup code, and replace <new_luc> with the new internal name of the lookup code.

Wfchlut.sql

Use wfchlut.sql to change the internal name of a lookup type and update all references to the lookup type. See: Change the internal name of a workflow object.

Use the script as follows:

sqlplus <user/pwd> @wfchlut <old_lut> <new_lut>

Replace <old_lut> with the current internal name of the lookup type, and replace <new_lut> with the new internal name of the lookup type.

Wfchmsg.sql

Use wfchmsg.sql to change the internal name of a message and update all references to the message. See: Change the internal name of a workflow object.

Use the script as follows:

sqlplus <user/pwd> @wfchmsg <msg_type> <old_msg> <new_msg>

Replace <msg_type> with the item type of the message you wish to update, replace <old_msg> with the current internal name of the message, and replace <new_msg> with the new internal name of the message.

Wfchmsga.sql

Use wfchmsga.sql to change the internal name of a message attribute. This script does not update the message subject or message body references to the message attribute, however. You must manually update the message attribute references. See: Change the internal name of a workflow object.

Use the script as follows:

sqlplus <user/pwd> @wfchmsga <msg_type> <msg_name> <old_attr> <new_attr>

Replace <msg_type> with the item type of the message attribute you wish to update, replace <msg_name> with the internal name of the message that the message attribute belongs to, replace <old_attr> with the current internal name of the message attribute, and replace <new_attr> with the new internal name of the message attribute.

Wfdirchk.sql

Use wfdirchk.sql to check for the following conditions in your directory service data model:

Wfdirchk.sql should return no rows to ensure that your directory service data model is correct.

Use the script as follows:

sqlplus <user/pwd> @wfdirchk

Wfevtenq.sql

Use wfevtenq.sql to enqueue an event message on a local queue using an override agent. This script constructs an event message using the event name, event key, event data, From Agent, and To Agent you specify. Then the event message is enqueued on the queue associated with the override agent you specify, which can be different than the From Agent listed inside the event message. If no override agent is specified, the event message is enqueued on the message's From Agent by default.

Note: This script can only enqueue an event message onto a queue for an agent on the local system.

Use the script as follows:

sqlplus <user/pwd> @wfevtenq <overrideagent> <overridesystem> 
<fromagent> <fromsystem> <toagent> <tosystem> <eventname> 
<eventkey> <message>

Replace the variables with your parameters as follows:

Wfjvstop.sql

Use wfjvstop.sql to stop the Java Function Activity Agent by placing a stop message on the 'Outbound' queue.

Use the script as follows:

sqlplus <user/pwd> @wfjvstop

Wfmlrdbg.sql

Use wfmlrdbg.sql to display debugging information for a notification that you can use to check the status of the notification or investigate errors. This script creates an output file named wfmlrdbg<nid>.html, where <nid> is the notification ID (NID).

For Oracle Applications, use the script as follows:

sqlplus <user/pwd> @wfmlrdbg <nid>

For standalone Oracle Workflow, use the script as follows:

sqlplus <user/pwd> @wfmlrdbg <nid> <FND_schema>

Replace <nid> with the notification ID for the notification. For standalone Oracle Workflow, also replace <FND_schema> with the ORACLE username for Oracle Workflow, usually owf_mgr.

Note: In Oracle Applications, you can also obtain this information by running the Mailer Diagnostic Test in Oracle Diagnostics. See: Mailer Diagnostic Test.

Wfnlena.sql

If you define a new language in your Oracle installation, use wfnlena.sql to enable or disable that language in Oracle Workflow. See: WFNLADD.sql.

Use the script as follows:

sqlplus <user/pwd> @wfnlena <language_code> <enable_flag>

Replace <language_code> with a valid language code, and replace <enable_flag> with Y to enable and N to disable the specified language.

Note: The wfnlena.sql and WFNLADD.sql scripts prepare the database for loading workflow definitions in another language. However, these scripts by themselves do not enable displaying Oracle Workflow Web pages in other languages. See: Setting Up Additional Languages.

Wfntfsh.sql

Use wfntfsh.sql to display status information about a particular notification, given its notification ID.

Use the script as follows:

sqlplus <user/pwd> @wfntfsh <notification_id>

Wfprot.sql

Use wfprot.sql to reset the protection level of all objects associated with a specified item type.

Important: If you reset the protection level for all objects in an item type, then none of those objects in the item type will be customizable by users operating at an access level higher than the new protection level.

Use the script as follows:

sqlplus <user/pwd> @wfprot <item_type> <protection_level>

Replace <item_type> with the item type that you want to reset the protection level for, and replace <protection_level> with the new protection level.

Wfqclean.sql

Use wfqclean.sql to clean up Workflow queues in the system tables.

Important: This script is only necessary if you are using a version of the Oracle8 Database prior to 8.1.5 and you drop your user or tablespace without previously dropping the Workflow queues using wfqued.sql. The wfqued.sql script is located in the Oracle Workflow sql subdirectory. The DROP USER CASCADE and DROP TABLESPACE INCLUDING CONTENTS commands in these prior versions of Oracle8 leave queue data in your system tables that result in an ORA-600 error when you recreate the queues. To avoid this case, you should always run wfqued.sql to drop the queues prior to dropping the user or tablespace.

Use the wfqclean.sql script as follows:

sqlplus system/manager @wfqclean <un>

Replace <un> with the username of the schema that experiences the ORA-600 error.

Wfrefchk.sql

Use wfrefchk.sql to check for invalid workflow data that is missing primary key data for a foreign key.

sqlplus <user/pwd> @wfrefchk

Wfretry.sql

Use wfretry.sql to display a list of activities that have encountered an error for a given process instance and then specify whether to skip, retry, or reset any one of those errored activities.

Use the script as follows:

sqlplus <user/pwd> @wfretry <item_type> <item_key>

Provide an item type and item key to uniquely identify an item or process instance. The script first returns the list of errored activities by label name. The script then prompts you for the label name of an activity that you wish to skip, retry, or reset. If you choose skip, then you must also specify the result that you want the skipped activity to have.

Note: This script calls the WF_ENGINE HandleError API, so you can actually specify the label name of any activity associated with the specified item type and item key to perform a rollback. See: HandleError, Oracle Workflow API Reference.

Wfrmall.sql

Use wfrmall.sql to delete all data in all Oracle Workflow runtime and design time tables.

Use the script as follows:

sqlplus <user/pwd> @wfrmall

Warning: This script deletes ALL workflow definitions. Do not use this script unless you are absolutely sure you want to remove all workflow data from your runtime and design time tables.

After you run this script, you should also reload the workflow definitions for the Standard, System: Mailer, and System: Error item types stored in the files wfstd.wft, wfmail.wft, and wferror.wft, respectively.

Wfrmita.sql

Use wfrmita.sql to delete all workflow data for a specified item type attribute. This script prompts you for the item type and the name of the attribute to delete. Alternatively, you can use Oracle Workflow Builder to delete an item type attribute from a workflow definition stored in a file or a database.

Use the script as follows:

sqlplus <user/pwd> @wfrmita

Wfrmitms.sql

Use wfrmitms.sql to delete status information in Oracle Workflow runtime tables for a particular item. This script prompts you to choose between deleting all data associated with a specified item type and item key or deleting only data for the completed activities of the specified item type and item key.

Use the script as follows:

sqlplus <user/pwd> @wfrmitms <item_type> <item_key>

Wfrmitt.sql

Use wfrmitt.sql to delete all data in all Oracle Workflow design time and runtime tables for a particular item type. This script prompts you for an item type from a list of valid item types.

Use the script as follows:

sqlplus <user/pwd> @wfrmitt

Warning: This script deletes ALL workflow data for the specified item type.

Wfrmtype.sql

Use wfrmtype.sql to delete runtime data associated with a given item type. This script prompts you for an item type to purge from a list of valid item types, then asks you to choose between deleting all runtime data associated with the specified item type or deleting only runtime data for the completed activities and items of the specified item type.

Use the script as follows:

sqlplus <user/pwd> @wfrmtype

Wfrun.sql

Use wfrun.sql to create and start a specified process.

Use the script as follows:

sqlplus <user/pwd> @wfrun <item_type> <item_key> <process_name>

Note: The item key for a process instance can only contain single-byte characters. It cannot contain a multibyte value.

Wfstat.sql

Use wfstat.sql to display a developer status report for a specified item. The output is 132 characters per line.

Use the script as follows:

sqlplus <user/pwd> @wfstat <item_type> <item_key>

Wfstatus.sql

Use wfstatus.sql to display an end user status report for a specified item. The output is 132 characters per line.

Use the script as follows:

sqlplus <user/pwd> @wfstatus <item_type> <item_key>

Wfstdchk.sql

Use wfstdchk.sql to check and report any problems found in the Oracle Workflow data model. For example, this script will report any function activities that reference invalid functions and scan the tables of each workflow process definition object to verify that each row has a valid internal name and display name.

Use the script as follows:

sqlplus <user/pwd> @wfstdchk

Wfver.sql

Use wfver.sql to display the version of the Oracle Workflow server, the status and version of the Oracle Workflow PL/SQL packages, and the version of the Oracle Workflow views installed.

Use the script as follows:

sqlplus <user/pwd> @wfver

Wfverchk.sql

Use wfverchk.sql if you suspect that problems arising in your workflow process are due to multiple versions of an activity being active simultaneously. This script identifies errors in versions of activities that cause multiple versions to appear to be active at once.

Use the script as follows:

sqlplus <user/pwd> @wfverchk

Wfverupd.sql

Use wfverupd.sql to correct problems arising in your workflow process that are due to multiple versions of an activity being active simultaneously. This script identifies and corrects errors in versions of activities that cause multiple versions to appear to be active at once.

Use the script as follows:

sqlplus <user/pwd> @wfverupd