Process to clean an unused process task in OIM process definition
OIM Tables used while clean up and it’s meanings:
MIL -Table stores task informationTOS -Holds information about a process.
EVT -Defines event handlers by providing a the process and class name. In addition the scheduling time of when the event handler can execute is set to pre (insert, update, delete) or post (insert, update, delete).
ADP -Defines an adapter created through the Adapter Factory.
DEP -Dependencies Among Tasks Within A Workflow Process.
MAV -Stores the runtime data mappings for ‘Process Task’ adapters. The data source being a process form, Location, User, Organization, Process, IT Resource, or Literal data.
MEV -E-mail notification events.
MSG -Defines the user groups that have permission to set the status of a process task.
MST -Task Status And Object Status Information. Holds All The Task Status To Object Status Mappings.
OSI -Holds information about tasks that are created for an order.
OSI_RESTORE - Table does not exists
OTI -Holds specific information such as status or scheduled dates about an instance of a task which are in Pending(Provisioning/Approval tasks ) and Rejected (Provisioning tasks) status buckets.
RGM -Table for Response Code Generated Milestones.
UNM -“UnDo Milestone” Feature.
RSC -Defines The All The Possible Response Code For A Process Task.
RVM -Holds Recovery Milestones.
RML -Rules To Apply To Task, Defines The Task Assignment Rules Attached To A Process Task.
Steps to delete these tasks with the sql queries running from OIM Database:
NOTE: This is not recommended doing in the higher environments as running sql queries from OIM database directly is not recommended.
Get the MIL_KEY from the task name that needs to be deleted:
select * from MIL where MIL_NAME='<Task_Name to be deleted>';
select * from MIL where MIL_KEY='';
select * from MIL where MIL_NAME='<Task_Name to be deleted>';
select * from MIL where MIL_KEY='';
Run the following queries and record the number of rows returned by each query:
select * from EVT where EVT_KEY in (select EVT_KEY from MIL where MIL_KEY='');
select * from ADP where EVT_KEY in (select EVT_KEY from MIL where MIL_KEY='');
select * from DEP where MIL_KEY='';
select * from MAV where MIL_KEY='';
select * from MEV where MIL_KEY='';
select * from MSG where MIL_KEY='';
select * from MST where MIL_KEY='';
select * from OFFLINE_USER_ATTRIBUTES where MIL_KEY='';
select * from OSI where MIL_KEY='';
select * from OSI_RESTORE where MIL_KEY='';
select * from OTI where MIL_KEY='';
select * from RGM where MIL_KEY='';
select * from RML where MIL_KEY='';
select * from RSC where MIL_KEY='';
select * from RVM where MIL_KEY='';
select * from UNM where MIL_KEY='';
Clean the data found from the above queries returned:
delete from OSI where MIL_KEY='';
delete from RSC where MIL_KEY='';
Now, Login to design console to delete the task manually.
select * from EVT where EVT_KEY in (select EVT_KEY from MIL where MIL_KEY='');
select * from ADP where EVT_KEY in (select EVT_KEY from MIL where MIL_KEY='');
select * from DEP where MIL_KEY='';
select * from MAV where MIL_KEY='';
select * from MEV where MIL_KEY='';
select * from MSG where MIL_KEY='';
select * from MST where MIL_KEY='';
select * from OFFLINE_USER_ATTRIBUTES where MIL_KEY='';
select * from OSI where MIL_KEY='';
select * from OSI_RESTORE where MIL_KEY='';
select * from OTI where MIL_KEY='';
select * from RGM where MIL_KEY='';
select * from RML where MIL_KEY='';
select * from RSC where MIL_KEY='';
select * from RVM where MIL_KEY='';
select * from UNM where MIL_KEY='';
Clean the data found from the above queries returned:
delete from OSI where MIL_KEY='';
delete from RSC where MIL_KEY='';
Now, Login to design console to delete the task manually.