Orphan action items seen in the My Workspace
search cancel

Orphan action items seen in the My Workspace

book

Article ID: 420677

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity FedRAMP Clarity PPM SaaS

Issue/Introduction

We are seeing few of the action items are in the 'Pending' tab of the workspace but there is no longer any process instance for those action items.  Can you let us know how to clear this orphan records of action items 

 

Environment

Clarity All Supported Versions

Cause

Action items associated with a process instance become orphaned when the process instance is deleted before the action item is completed, resulting in orphaned records.

Resolution

  1. Run the below script to find out if the orphan action items 
    SELECT USER_ID, id Action_Item_ID, OBJECT_TYPE_NAME, OBJECT_ID,SUB_OBJECT_TYPE, SUB_OBJECT_ID, PROCESS_HANDLER_ID
    FROM CAL_ALL_ACTION_ITEMS_V
    WHERE LANGUAGE_CODE = 'en'
    AND USER_ID != 8
    -- AND USER_ID = 1
    AND ((STATUS_CODE != 'CAL_CLOSED' AND STATUS_CODE != 'CAL_DEFERRED' AND
    STATUS_CODE != 'CAL_DONE' ) OR STATUS_CODE IS NULL )
    AND not exists
    (SELECT rp.id process_instance_id, rp.process_version_id, rs.step_id
    FROM BPM_RUN_STEP_ACTION_RESULTS sar, BPM_RUN_STEPS rs, BPM_RUN_PROCESSES rp
    WHERE sar.id = PROCESS_HANDLER_ID
    AND sar.step_instance_id = rs.id
    AND rp.id = rs.process_instance_id)
    AND PROCESS_HANDLER_ID is not null;
  2. Run the  Purge Action Items Job which can delete the old action items based on the parameter chosen to delete the action items