Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

check workitem approval status

 Hi All,
           How can we check whether an approval item is approved - using Java API (Advisor Plugin)? What is the associated method?

I need 2 approval items - to be in approved status - for the workitem to proceed further with the workflow.

Thanks.

1

0 votes



One answer

Permanent link
You should be able to do something along the lines of....

        IWorkItemClient workItemClient= (IWorkItemClient)teamRepository.getClientLibrary(IWorkItemClient.class);
        IWorkItemWorkingCopyManager manager= workItemClient.getWorkItemWorkingCopyManager();
        manager.connect(workItemHandle, IWorkItem.SMALL_PROFILE, progress.newChild(20));
        IWorkItem workItem= null;
        try {
            WorkItemWorkingCopy copy= manager.getWorkingCopy(workItemHandle);
            workItem= copy.getWorkItem();
           
            workItem.getApprovals().getContents();

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,126

Question asked: Sep 05 '12, 1:50 p.m.

Question was seen: 5,007 times

Last updated: Sep 06 '12, 2:25 p.m.

Confirmation Cancel Confirm