It's all about the answers!

Ask a question

check workitem approval status


0
1
VK L (8177157159) | asked Sep 05 '12, 1:50 p.m.
 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.

One answer



permanent link
Lauren Hayward Schaefer (3.3k11727) | answered Sep 06 '12, 2:25 p.m.
JAZZ DEVELOPER
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();

Your answer


Register or 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.