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

Adding multiple approvers to an approval item

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.

0 votes



3 answers

Permanent link
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.

0 votes


Permanent link
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.

0 votes


Permanent link
 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

-1 votes

Comments

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 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
× 10,937
× 6,121

Question asked: Jul 11 '12, 3:38 a.m.

Question was seen: 6,317 times

Last updated: Jul 27 '12, 1:57 a.m.

Confirmation Cancel Confirm