procedure Items (itemtype in varchar2 default null, itemkey in varchar2 default null, enddate in date default sysdate, docommit in boolean default TRUE, force in boolean default FALSE, purgesigs in pls_integer default null);
Deletes all items for the specified item type, item key, and end date, including process status information, notifications, and any comments associated with these notifications. However, to preserve electronic signature evidence for future reference, this API 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.
Deletes from the tables WF_NOTIFICATIONS, WF_COMMENTS, WF_ITEM_ACTIVITY_STATUSES, WF_ITEM_ATTRIBUTE_VALUES, and WF_ITEMS, and, if specified, from WF_DIG_SIGS.
Note: Oracle Workflow cannot purge work items that have circular parent/child relationships. That is, if a parent item has a child item that in turn is the parent of another child, and so on, a lower-level item in the parent/child hierarchy cannot be set as the parent of a higher-level item. To purge such items, you must first remove the parent/child relationship by calling WF_ENGINE.SetItemParent with null values for the parent item type and parent item key.
| itemtype | Item type to delete. Leave this argument null to delete 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 item type. |
| enddate | Specified date to delete up to. |
| docommit | Specify TRUE or FALSE to indicate whether to commit data while purging. If you want Items() 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. |
| force | Specify TRUE or FALSE to indicate whether to delete records for child items that have ended, even if the corresponding parent item does not yet have an end date. Defaults to FALSE. |
| 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. |