procedure Total (itemtype in varchar2 default null, itemkey in varchar2 default null, enddate in date default sysdate, docommit in boolean default TRUE, runtimeonly in boolean default null, purgesigs in pls_integer default null, purgeCacheData in boolean default false);
Deletes all eligible obsolete runtime item type data that is associated with the specified item type and has an END_DATE less than or equal to the specified end date. If the ECX: Purge ECX data with WF profile option is set to Y, then this procedure also deletes any Oracle XML Gateway transaction information associated with the items being purged.
However, to preserve electronic signature evidence for future reference, this procedure by default does not delete any notifications that required signatures or their associated signature information. If you do not need to maintain signature evidence, you can choose to delete signature-related information as well.
If the runtimeonly parameter is set to TRUE or left null, Total() deletes only runtime data associated with work items. However, if the runtimeonly parameter is set to FALSE, Total() also deletes these types of data:
All eligible obsolete activity design data that is associated with the specified item type and has an END_DATE less than or equal to the specified end date. See: Activities.
Expired ad hoc users and roles in the Workflow local tables that are no longer in use. See: Directory.
All eligible notifications 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. See: Notifications.
Oracle XML Gateway transaction information that is not associated with any existing work item, if the ECX: Purge ECX data with WF profile option is set to Y. This information is purged using the ECX_PURGE.Purge_Items API. See: Oracle XML Gateway User's Guide.
Because Total() purges additional design data and runtime data not associated with work items when you set the runtimeonly parameter to FALSE, it is more costly in performance than Items(). If you want to purge a specific item key, use Items(), or set the runtimeonly parameter to TRUE when you run Total() to enhance performance. Run Total() with the runtimeonly parameter set to FALSE as part of your routine maintenance during periods of low activity. See: Items.
You can also optionally use Total() to purge cached data from the WF_ATTRIBUTE_CACHE and WF_ENTITY_CHANGES tables. These tables contain cached data related to defining users as well as integration with LDAP and Oracle Directory Services.
| itemtype | Item type associated with the obsolete data you want to delete. Leave this argument null to delete obsolete data for all item types. |
| itemkey | A string generated from the application object's primary key. The string uniquely identifies the item within an item type. If null, the procedure purges all items in the specified itemtype. |
| enddate | Specified date to delete up to. |
| docommit | Specify TRUE or FALSE to indicate whether to commit data while purging. If you want Total() to commit data as it purges to reduce rollback size and improve performance, specify TRUE. If you do not want to perform automatic commits, specify FALSE. Defaults to TRUE.
Note: By default, the procedure commits data after every 1000 records. It then 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 procedure may not purge all eligible items. To purge these remaining work items, simply rerun the procedure. |
| runtimeonly | Specify TRUE to purge only obsolete runtime data associated with work items, or FALSE to purge all obsolete runtime data as well obsolete design data. Defaults to null, which is treated as a value of TRUE. |
| purgesigs | Leave this parameter null to preserve signature evidence, including notifications that required electronic signatures and their associated signature information. Specify 1 to delete signature-related information. Defaults to null. |
| purgeCacheData | Specify TRUE to purge cached user definition data from the WF_ATTRIBUTE_CACHE and WF_ENTITY_CHANGES tables. Specify FALSE if you do not want to purge this data. The default is FALSE. |