Hi Dhawan,
I understand you are trying to get rid of data but consider (now and in the future) that there is a process to cleanup workpoint process definitions as well as runtime data. In any case, prior to deleting you will need to take a backup of your WPDS db.
To clear runtime data you use the OOTB stored procedure:
spWP_DELETE_JOBS
You can refer to the following KB article about how to do it properly:
Clearing Unwanted Workpoint Jobs from Runtime - CA Identity Manager - 12.6.8 - CA Technologies Documentation
This calls spWP_DELETE_JOBS_BYLEVEL, which clears linked data from all WP_ACTI tables (where instances of the objects of WP_ACT are defined).
I reproduced this error on my machine, by running the following query (e.g. trying to remove DeleteOrganizationApproveProcess):
Once you've cleared all your runtime data, you can remove all static object definitions, e.g. processes, actions, transitions, alerts, forms, scripts, mail etc. You do this from Designer:
Once it is done, you should have an empty WP_PROC table (among others). The WP_PROC table appearing empty is a clear indication that no more processes are in the system, because it contains the process definition object.
For any further issues in this thread, please open a case with CA Support.
Thanks,
Einav