Professional Documents
Culture Documents
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 are purged in all other workflow runtime tables.
select item_type,activity_status,count(*)
from wf_item_activity_statuses
group by item_type,activity_status
Output :
INVTROAP COMPLETE 8
INVTROAP DEFERRED 1
CREATEPO ERROR 5
NOTIFIED A workflow exception has been raised and the wferror process
started. There will be an unactioned notification somewhere on the system.
WF_PURGE is the database defined package which contains the APIs to purge
workflow runtime tables.
WF_PURGE.ITEMS Itemtype
Itemkey
WF_PURGE.ACTIVITIES Itemtype
Enddate Removes obsolete activities versions. These are versions of
activities that are no longer used by any item.
WF_PURGE.NOTIFICATIONS Itemtype
WF_PURGE.TOTAL Itemtype
Itemkey
WF_PURGE.TOTALPERM Itemtype
Itemkey
Enddate Deletes all eligible obsolete run-time data that has a persistence
type of Permanent.
Wf_Purge.Items:
Purge all runtime date associated with completed items, their processes, and
notifications sent by them.
Parameters:
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.
WF_ACTIVITY_ATTR_VALUES,
WF_ACTIVITY_TRANSITIONS,
WF_PROCESS_ACTIVITIES,
WF_ACTIVITY_ATTRIBUTES_TL,
WF_ACTIVITY_ATTRIBUTES,
WF_ACTIVITIES_TL and
have an END_DATE less than or equal to the specified end date and
Wf_Purge.AdHocDirectory :
whose expiration date has elapsed and that are not referenced in any
notification.
Once you decide upon the number of days. Then you will have to run the
following script by login with apps user.
This SQL find the open notifications who had recipient as sysadmin and
whose begin date is older than x days.
*****
FROM DUAL;
DECLARE
l_commit_count NUMBER := 1;
CURSOR c1
IS
SELECT notification_id
FROM wf_notifications
BEGIN
FOR c1rec IN c1
LOOP
IF l_commit_count = l_commit_interval
THEN
COMMIT;
l_commit_count := 1;
ELSE
l_commit_count := l_commit_count + 1;
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
RAISE;
END;
*****
You can supply the following parameters for thePurge Obsolete Workflow
Runtime
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 this fie defaults to purging the
runtime data for all item keys.
Gather Stats
Once it is done please GATHER STATS for the fall tables owned by apps user
WF_ITEM_ACTIVITY_STATUSES
WF_ITEM_ACTIVITY_STATUSES_H
WF_NOTIFICATION_ATTRIBUTES
WF_COMMENTS
WF_NOTIFICATIONS
WF_ITEM_ATTRIBUTE_VALUES
WF_ITEMS
WF_ACTIVITY_ATTR_VALUES
WF_ACTIVITY_TRANSITIONS
WF_PROCESS_ACTIVITIES
WF_ACTIVITY_ATTRIBUTES_TL
WF_ACTIVITIES_TL
WF_ACTIVITIES
WF_LOCAL_USER_ROLES
WF_USER_ROLE_ASSIGNMENTS
WF_LOCAL_ROLES