Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

FAQ on Purging Oracle Workflow Data [ID 277124.

1]  

  Modified 21-DEC-2009     Type FAQ Status PUBLISHED 

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:

Oracle Workflow Cartridge - Version: 11.0 to 12.0


Information in this document applies to any platform.
Purge Obsolete Workflow Runtime Data FNDWFPR

Checked for relevance on 21-DEC-2009.

Purpose

This note gives common question answers regarding workflow purge process.
This helps user to understand basic functionality of this process.

Questions and Answers

WHICH WORKFLOW TABLES DO I NEED TO CHECK?

Master workflow runtime table is WF_ITEMS.


All other runtime table records are associated to record in WF_ITEMS.
If records are purged in WF_ITEMS, records ar purged in all other workflow runtime tables.
Checking the workflow runtime table master table for progress purging is the same as check any other workflow
runtime table.

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.

These queries give the volumen of data in the tables.

select count(*) from WF_ITEM_ATTRIBUTE_VALUES;


select count(*) from WF_ITEM_ACTIVITY_STATUSES;
select count(*) from WF_NOTIFICATION_ATTRIBUTES;

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'

WHAT ARE THE APIs PROVIDED FOR PURGING WORKFLOW DATA?

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.

The most commonly used procedures are:


Wf_Purge.Items :

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:

itemtype : Item type to delete, or null for all itemtypes


itemkey : Item key to delete, or null for all itemkeys
enddate : Purges wf processes closed after this date
force : Forces to purge closed wf processes even if it has wf slibing
processes open.
docommit : TRUE does commit, FALSE deleted but does not commit.

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 :

Purge users and roles in the WF_LOCAL_* tables


whose expiration date has elapsed and that are not referenced in any notification.

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'.

WHAT PARAMETERS DO I PASS TO THE PURGE APIs?

Many of the Purge APIs accept the following parameters:

 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.

WHICH CONCURRENT PROGRAM DO I NEED TO USE FOR PURGING?

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.

WHERE IS THE OFFICIAL DOCUMENTATION AVAILABLE?Answer

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

NOTE:132254.1 - Speeding Up And Purging Workflow


NOTE:141853.1 - Workflow Performance is Very Slow And Workflow Background Tables Are Large
NOTE:144806.1 - A Detailed Approach To Purging Oracle Workflow Runtime Data
NOTE:165316.1 - bde_wf_data.sql - Query Workflow Runtime Data That Is Eligible For Purging

Related

Products

 Oracle E-Business Suite > Applications Technology > Integration > Oracle Workflow Cartridge

You might also like