It's all about the answers!

Ask a question

Adding multiple approvers to an approval item


VK L (8177129159) | asked Jul 11 '12, 3:38 a.m.
Hi All,
          How to add multiple approvers to an approval item programatically? createApproval method allows only 1 contributor handle. How to add multiple approvers?

My code is :

IContributorService IConService = getService(IContributorService.class);
             IContributorHandle user = IConService.fetchContributorByUserId("ccm_user");
            IApprovals approvals= sourceworkItem.getApprovals();
            IApprovalDescriptor descriptor= approvals.createDescriptor(WorkItemApprovals.APPROVAL_TYPE.getIdentifier(), "Lead Developer Approval");

                
                     IApproval approval= approvals.createApproval(descriptor, user);
                                             approvals.add(approval);

Thanks.

3 answers



permanent link
Luan Doan-Minh (2423) | answered Jul 13 '12, 1:00 p.m.
JAZZ DEVELOPER
I haven't seen a method to add multiple contributors to an approval.

What will work though, is to create a new approval for each contributor but with the same descriptor.

permanent link
VK L (8177129159) | answered Jul 27 '12, 1:57 a.m.
Make sure you have imported the appropriate package in your code - if its an error while you debug...If its during runtime, then check your ccm.log file to get details.

-1
permanent link
Nicolás Rodríguez (3141525) | answered Jul 26 '12, 6:13 p.m.
 Hi

I am getting an error when I use the line:

IContributorService IConService = getService(IContributorService.class); 

the exception says: the service cant be found,Do you know why this can be happenning ?

I am using this line in a class that extends from AbstractService and implements IOperationParticipant

Comments
David Olsen commented Jul 26 '12, 7:37 p.m.
JAZZ DEVELOPER

This is a new issue that is not directly related to the original question. It should be converted to be its own question.

Your answer


Register or to post your answer.