How to clean up Orphaned Tasks


Article ID: 129700


Updated On:


SUPPORT AUTOMATION- SERVER CA Service Desk Manager - Unified Self Service KNOWLEDGE TOOLS CA Service Management - Service Desk Manager CA Process Automation Base


Occasionally when a Process instance creates a TASK but the instance completes without that TASK being completed, the TASK can occasionally become Orphaned where it remains on the TASK list, but the instance is no longer running.   

How can these Orphaned tasks be cleared from the system?


Release: ITPASA99000-4.3-Process Automation-Add On License for-CA Server Automation


This issue occurs most often to Tasks for Instances that are ABORTED manually through the GUI.   Once the process instance is aborted the link between the instance and the task is broken leaving an orphaned task that cannot be deleted through the PAM UI.
We patched this in a cumulative fix pack for 4.2 sp2, a fix which is included in 4.3 sp1 or later, but unfortunately we still do see occasional Tasks becoming Orphaned. 

If this happens and you find tasks on the Task list that no longer have a process instance due to the instance being aborted, archived, and ultimately purged, you will need to manually delete it from the database.

Get the TASKID from the Operations dashboard - Task view for use in the SQL Statements below.

<Please see attached file for image>

This first query will return the TASK from the database for your review:
select * FROM C2ORuntimeObjects where roid=<taskid>

Then to Delete the TASK:
Delete FROM C2ORuntimeObjects where roid=<tasked>


Additional Information

Please note, these commands are for MS SQL database.  Please discuss with your DBA if you are using MYSQL or Oracle.


1558688681318000129700_sktwi1f5rjvs16fo8.png get_app