It's all about the answers!

Ask a question

Workitem setting Approvals programmatically


0
1
EclipseTalk . (32735759) | asked Mar 24 '10, 4:31 p.m.
Hello,
How can one set the Approvals for a workitem programmatically? I see only a getter - workItem.getApprovals()
Should one use the setValue() method?
Thanks

One answer



permanent link
EclipseTalk . (32735759) | answered Mar 24 '10, 4:49 p.m.
I got it....

IApprovals approvals= workItem.getApprovals();
IApprovalDescriptor descriptor= approvals.createDescriptor(WorkItemApprovals.REVIEW_TYPE.getIdentifier(), "Review");
for (IContributorHandle reviewer: reviewers) {
IApproval approval= approvals.createApproval(descriptor, reviewer);
approvals.add(approval);
}

Your answer


Register or to post your answer.