Cancel
Showing results for 
Search instead for 
Did you mean: 

ITK API to achieve EPM-set-status -action=append | rename | replace | delete

Pioneer
Pioneer

Hi Experts,

 

EPM-set-status -action=append | rename | replace | delete

 

handler EPM-set-status lets you append/rename/replace or delete status from targets and attached objects.

 

How  can I achieve the same behavior through API.

 

to add status there is an API 

RELSTAT_add_release_status (tag_t  release_status,  int  count,   tag_t * ws_objects,  logical  retain_released_date)  

 

However, to achieve replace action, how to delete existing status(s) -

input is array(tag) of objects  from which status is to be removed  but available APIs need job/rootTask tag

 

The API below needs job tag

EPM_remove_release_status(tag_t job, tag_t release_status)
 

this API needs root task tag..

EPM_remove_status_from_targets (tag_t  release_status, tag_t  root_tag)

3 REPLIES

Re: ITK API to achieve EPM-set-status -action=append | rename | replace | delete

Valued Contributor
Valued Contributor

@GunjanYou can clear the VLA attribute "release_status_list" on the object using  POM_clear_attr()  which will get rid of all the statuses and then you can apply new status. However, if you need selective removal of statuses, then you have get the individual tags from "release_status_list" and remove only the status tag that you dont need from the array using POM_remove_from_attr().

Good Luck !

Re: ITK API to achieve EPM-set-status -action=append | rename | replace | delete

Pioneer
Pioneer

Hi Santhosh,

 

Thanks for your response. 

Yes this is one way, I just wanted to confirm if there is any API available to achieve it, as this is common requirement to append/remove statuses from objects.

 

Thanks again.

Re: ITK API to achieve EPM-set-status -action=append | rename | replace | delete

Valued Contributor
Valued Contributor

Hi Gunjan

I remember logging an enhancement request with GTAC to add an arugment to RELSTAT_add_release_status couple of years ago. Not able to find that IR anymore !