Sie sind auf Seite 1von 5

9/18/13

Document Display

FAQ on Purging Oracle Workflow Data (Doc ID 277124.1)


Modified: Jul 7, 2013 In this Document Purpose Questions and Answers Which Workflow Tables Need To Be Checked? What Are The APIs Provided For Purging Workflow Data? What Parameters Are Passed To The Purge APIs? Which Concurrent Program Is Used For Purging? What's The Recommended Frequency For Running The 'Purge Obsolete Workflow Runtime Data' Concurrent Program? What Are The Parameter Values To Define To Run The 'Purge Obsolete Workflow Runtime Data' Concurrent Program? Workflow Information Center, Diagnostics, & Community Where Is The Official Documentation Available? References Type: FAQ Status: PUBLISHED Priority: 3

APPLIES TO:
Oracle Workflow Cartridge - Version 11.0 to 12.1.3 [Release 11 to 12.1] Information in this document applies to any platform. Purge Obsolete Workflow Runtime Data FNDWFPR Checked for relevance on 07-JUL-2013

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

Please refer to Note 985332.1 for purge performance patches.

QUESTIONS AND ANSWERS


Which Workflow Tables Need To Be Checked?
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.
https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_adf.ctrl-state=tt2cesvvq_75 1/5

9/18/13

Document Display

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.
s e l e c tw i . i t e m _ t y p eI T E M _ T Y P E , w i t . p e r s i s t e n c e _ t y p eP _ T Y P E , d e c o d e( w i . e n d _ d a t e ,N U L L ,' O P E N ' ,' C L O S E D ' )S t a t u s , c o u n t ( * )C O U N T f r o mw f _ i t e m sw i , w f _ i t e m _ t y p e sw i t w h e r ew i t . n a m e=w i . i t e m _ t y p e g r o u pb yi t e m _ t y p e , w i t . p e r s i s t e n c e _ t y p e , W I T . P E R S I S T E N C E _ D A Y S , d e c o d e( w i . e n d _ d a t e ,N U L L ,' O P E N ' ,' C L O S E D ' ) o r d e rb yd e c o d e( w i . e n d _ d a t e ,N U L L ,' O P E N ' ,' C L O S E D ' ) ,4d e s c ;

This query displays the parameter arguments in order for a Concurrent Program:
S E L E C Tp . U S E R _ C O N C U R R E N T _ P R O G R A M _ N A M E" N A M E " , c . C O N C U R R E N T _ P R O G R A M _ N A M E" I N T E R N A L " , f . E N D _ U S E R _ C O L U M N _ N A M E" P A R A M E T E R " , f . E N A B L E D _ F L A G" O N _ O F F " , f . D E F A U L T _ V A L U E , f . R E Q U I R E D _ F L A G ,f . D E S C R I P T I O N F R O MF N D _ D E S C R _ F L E X _ C O L _ U S A G E _ V Lf ,F N D _ C O N C U R R E N T _ P R O G R A M S _ T Lp ,f n d _ c o n c u r r e n t _ p r o g r a m sc W H E R Es u b s t r ( f . D E S C R I P T I V E _ F L E X F I E L D _ N A M E , 7 , 8 ) = c . C O N C U R R E N T _ P R O G R A M _ N A M E a n dc . C O N C U R R E N T _ P R O G R A M _ I D=p . C O N C U R R E N T _ P R O G R A M _ I D a n dp . U S E R _ C O N C U R R E N T _ P R O G R A M _ N A M EL I K E' % W o r k f l o w % ' a n d( f . D E S C R I P T I V E _ F L E X F I E L D _ N A M El i k e' $ S R S $ . F N D W F P R % ' ) A N Dp . L A N G U A G E=' U S ' o r d e rb yf . D E S C R I P T I V E _ F L E X F I E L D _ N A M E ,f . C O L U M N _ S E Q _ N U M ;

When workflow processes are not closed and purged, these workflow runtime tables could grow exponentially: WF_ITEM_ATTRIBUTE_VALUES WF_ITEM_ACTIVITY_STATUSES WF_NOTIFICATION_ATTRIBUTES Records in these tables are purged only if the records in the workflow master table (WF_ITEMS) qualifies to be purged. These queries give the volume 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.
https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_adf.ctrl-state=tt2cesvvq_75 2/5

9/18/13

Document Display

References Also, check the Note 165316.1-'bde_wf_data.sql - Query Workflow Runtime Data That Is Eligible For Purging'. For ATG RUP4 and higher, please reference Note 750497.1.

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 design data like workflow directory services data. Workflow design data are tables where workflow process definitions are stored and are not considered runtime data. The most commonly used procedures are: Wf_Purge.Items: Purge all runtime data 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 item types itemkey : Item key to delete, or null for all item keys 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. Core Workflow Only 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
https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_adf.ctrl-state=tt2cesvvq_75 3/5

9/18/13

Document Display

item types of with a persistence type of 'Permanent'.

What Parameters Are Passed 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 Is Used 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's The Recommended Frequency For Running The 'Purge Obsolete Workflow Runtime Data' Concurrent Program?
In short, Once Every 12 Hours for ALL item types daily. For maintaining a healthy workflow environment, the Purge Obsolete Workflow Runtime Data request should be scheduled regularly. Below is from the Workflow Administrator's Guide which reflects as a guideline, but the volumes differ for each instance: The Oracle Applications Manager console helps you easily maintain the Oracle Workflow and Oracle XML Gateway database tables. Oracle Workflow and Oracle XML Gateway access several tables that can grow quite large with obsolete workflow information that is stored for all completed workflow processes, as well as obsolete information for XML transactions. The size of these tables and indexes can adversely affect performance. These tables should be purged on a regular basis, using the Purge Obsolete Workflow Runtime Data concurrent program.

What Are The Parameter Values To Define To Run The '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 to be purged, either for Temporary or for Permanent. The default is temp. Core Workflow Only - Enter 'Y' to purge only obsolete runtime data associated with work items, or 'N' to purge all obsolete runtime data as well obsolete design data. The default is 'N'. Commit Frequency - Enter the number of records to purge before the program
https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_adf.ctrl-state=tt2cesvvq_75 4/5

9/18/13

Document Display

commits data. To reduce rollback size and improve performance, set this parameter to commit data after a smaller number of records. The default is 500 records. Note: After performing a commit, the program resumes purging work items with the next subsequent begin date. In some cases, if additional items have the same begin date as the last item that was purged before a commit, the program may not purge all eligible items. To purge these remaining work items, simply rerun the program. Signed Notifications - Enter 'N' to preserve signature evidence, including notifications that required electronic signatures and their associated signature information. Enter 'Y' to purge signature-related information. The default is 'N'.

Workflow Information Center, Diagnostics, & Community

Please reference the Workflow Product Information Center Document for Top Workflow Resources: Document 1320509.1 For additional help, please refer to one of the following documents on diagnostics to address current needs. Providing diagnostic output on an issue for support when logging a service request is very helpful. Note 179661.1 for 11i or Note 421245.1 for Rel 12.x Visit the Core Workflow community for help with industry experts or to share knowledge.

Where Is The Official Documentation Available?


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 Orion 'Knowledge' tab. Oracle Oracle Oracle Oracle Oracle Workflow Workflow Workflow Workflow Workflow Administrator's Guide 2.6.3 (PDF, 1183 Kb) Part number B10283-01 API Reference 2.6.3 (PDF, 860 Kb) Part number B10286-01 Developer's Guide 2.6.3 (PDF, 427 9Kb) Part number B10284-01 User's Guide 2.6.3 (PDF, 820 Kb) Part number B10285-01 Web Services Guide 2.6.3 (PDF, 100 Kb) Part number B10624-01

REFERENCES
NOTE:1320509.1 - E-Business Suite: Oracle Workflow (WF) Product Information Center (PIC) NOTE:132254.1 - Speeding Up And Purging Workflow 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 NOTE:179661.1 - E-Business Suite Diagnostics 11i Test Catalog NOTE:421245.1 - E-Business Suite Diagnostics References for R12 NOTE:750497.1 - Workflow Purge Data Collection Script NOTE:985332.1 - Performance: Purge Obsolete Workflow Runtime Data ( FNDWFPR ) Concurrent Request is Slow

https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_adf.ctrl-state=tt2cesvvq_75

5/5

Das könnte Ihnen auch gefallen