CA Identity Manager: How to programmatically get the workitem/job ID associated with an approval task
search cancel

CA Identity Manager: How to programmatically get the workitem/job ID associated with an approval task

book

Article ID: 72689

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Governance CA Identity Portal

Issue/Introduction

The following will demonstrate how to retrieve the work item/job ID from the Workpoint database, that is associated with an Approval task in CA Identity Manager runtime database Task Persistence.

Environment

Identity Manager 14.5

Resolution

An Approval Task exists in the Task Persistence database in the tasksession12_5 table, similarly to any other Administrative Task.

A workitem/job exists in the WPDS database (installed together with the other IM DBs) in the WP_PROCI table.

The are links between the TP DB and the WPDS DB as follows:

The unique identifier of the Approval Task is tasksession12_5.tasksessionid, which will have a match in WP_PROCI.name column.

Therefore, the flow of retrieval will go as follows:

 

1. Determine the TasksessionID.   The tasks 'Task ID' 
This can be gathered programmatically, for example with a TEWS6 call, or a direct database query, or manually found in the task View, see KB 16923 Search a submitted IM task by Task ID on View Submitted Tasks for details on how to configure VST to show Task ID values. 



2. Get the proci_id of the job associated to the Approval Task:

SELECT PROCI_ID FROM WP_PROCI WHERE NAME = <tasksessionid from step 1>



3. SELECT ACTI_ID FROM WP_WORK_ITEM WHERE PROCI_ID = <proci_id from step 2>


 

Attachments

1558694391976000072689_sktwi1f5rjvs16mm3.png get_app
1558694390188000072689_sktwi1f5rjvs16mm2.png get_app
1558694388305000072689_sktwi1f5rjvs16mm1.png get_app