Purging Oracle Workflow Data - Note 277
Purging Oracle Workflow Data - Note 277
1]
In this Document
Purpose
Questions and Answers
WHICH WORKFLOW TABLES DO I NEED TO CHECK?
WHAT ARE THE APIs PROVIDED FOR PURGING WORKFLOW DATA?
WHAT PARAMETERS DO I PASS TO THE PURGE APIs?
WHICH CONCURRENT PROGRAM DO I NEED TO USE FOR PURGING?
WHAT ARE THE PARAMETER VALUES TO DEFINE TO RUN 'Purge Obsolete Workflow Runtime Data'
CONCURRENT PROGRAM?
WHERE IS THE OFFICIAL DOCUMENTATION AVAILABLE?Answer
References
Applies to:
Purpose
This note gives common question answers regarding workflow purge process.
This helps user to understand basic functionality of this process.
This query will help you to determine volume of wf process classified by Status, item Type, and permanency.
select wi.item_type ITEM_TYPE,
wit.persistence_type P_TYPE,
decode (wi.end_date, NULL, 'OPEN', 'CLOSED') Status,
count(*) COUNT
from wf_items wi,
wf_item_types wit
where wit.name = wi.item_type
group by item_type,
wit.persistence_type,
WIT.PERSISTENCE_DAYS,
decode (wi.end_date, NULL, 'OPEN', 'CLOSED')
order by decode (wi.end_date, NULL, 'OPEN', 'CLOSED'), 4 desc;
When workflow processes are not closed and purged, these workflow runtime tables could growth exponentially:
WF_ITEM_ATTRIBUTE_VALUES
WF_ITEM_ACTIVITY_STATUSES
WF_NOTIFICATION_ATTRIBUTES
Records in these tables are purged only if the records in wf master table, WF_ITEMS, qualifies to be purged.
The above Workflow tables contain data which is used for Workflow background processing. If these tables grow too
large the Workflow performance level becomes slower. You should be purging these tables should be purged on a
regular basis.
References
Also, check the Note 165316.1-'bde_wf_data.sql - Query Workflow Runtime Data That Is Eligible For Purging'
WF_PURGE is the database defined package which contain the APIs to purge workflow runtime tables. There are also
APIs to purge not runtime data like workflow directory services data. Workflow design data, tables where wfprocess
definitions are stored is also not runtime data.
Purge all runtime date associated with completed items, their processes, and
notifications sent by them.
Deletes from the tables: WF_NOTIFICATIONS, WF_ITEM_ACTIVITY_STATUSES,
WF_ITEM_ATTRIBUTE_VALUES AND WF_ITEMS/
Parameters:
Wf_Purge.Activities :
Purges wf process definition versions that are not used and that are obsolete.
Deletes from tables:
WF_ACTIVITY_ATTR_VALUES,
WF_ACTIVITY_TRANSITIONS,
WF_PROCESS_ACTIVITIES,
WF_ACTIVITY_ATTRIBUTES_TL,
WF_ACTIVITY_ATTRIBUTES,
WF_ACTIVITIES_TL and
WF_ACTIVITIES that are associated with the specified item type,
have an END_DATE less than or equal to the specified end date and
are not referenced by an existing item as either a process or activity.
Wf_Purge.Total : Purge both item data and activity data.
Wf_Purge.AdHocDirectory :
Note:
The WF_PURGE_APIS only purge data associated with Temporary item type whose
persistence, in days, has expired. A persistence type PL/SQL variable is set
to 'TEMP' (Temporary) by default and should not be changed. Use the WF_PURGE.
TotalPERM API to delete all eligible obsolete runtime data associated with
item types of with a persistence type of 'Permanent'.
Item Type: The item type associated with the obsolete runtime data you want to delete. Leave this parameter
null to delete obsolete data for all item types
Item Key: A string generated from the application object's primary key. The string uniquely identifies the item
within an item type. Leave this parameter null to purge all items in the specified item type.
End Date: A specified date to delete up to.
Answer
------
In Oracle E-Business Suite, use the concurrent program 'Purge Obsolete Workflow
Runtime Data' (short name FNDWFPR) which calls database package WF_Purge.Total.
This program deletes old Workflow runtime data for completed Workflows.
It is recommended that this program or package is run regularly as required.
WHAT ARE THE PARAMETER VALUES TO DEFINE TO RUN 'Purge Obsolete Workflow Runtime Data'
CONCURRENT PROGRAM?
Item Type : The item type to purge. Leaving this field blank defaults to purging the runtime data for all item
types.
Item Key : The item key to purge. Leaving is field blank defaults to purging the runtime data for all item keys.
Age : Minimum age of data to purge, in days.
Persistence Type : The persistence type tbe purged, either ’TEMP’ for Temporary or ’PERM’ for Permanent.
The default TEMP’.
Runtime data : Yes, will purge only wf runtime data Runtime data defined No, will purge wf runtime data and wf
design data, wf process definitions.
Important Workflow documentation can be found in the Online Documentation library which resides in Oracle
Technology Network. There are links to the OTN Online documents in the MetaLink 'Knowledge' tab.
Oracle Workflow Administrator's Guide 2.6.3 (PDF, 1183 Kb) Part number B10283-01
Oracle Workflow API Reference 2.6.3 (PDF, 860 Kb) Part number B10286-01
Oracle Workflow Developer's Guide 2.6.3 (PDF, 427 9Kb) Part number B10284-01
Oracle Workflow User's Guide 2.6.3 (PDF, 820 Kb) Part number B10285-01
Oracle Workflow Web Services Guide 2.6.3 (PDF, 100 Kb) Part number B10624-01
References
Related
Products
Oracle E-Business Suite > Applications Technology > Integration > Oracle Workflow Cartridge