It's all about the answers!

Ask a question

RTC Java API - Reading attribute value using workitemcommon

Vignesh ramamoorthy Muniyandy (15410) | asked Jul 25 '17, 4:34 a.m.
edited Jul 25 '17, 7:51 a.m.

     I have a working code. Where I need to verify either my understanding is correct or to find the right way to do it.

public class HandleWorkflowOnStateChangeParticipant extends AbstractService

        implements IOperationParticipant {


public void run(AdvisableOperation operation,

IProcessConfigurationElement participantConfig,

IParticipantInfoCollector collector, IProgressMonitor monitor)

throws TeamRepositoryException {


WorkItemCommon workItemCommon = (IWorkItemCommon) getService(IWorkItemServer.class);



I was creating the operation participant for the first time. Where I have a requirement to the read the attribute value. And some where in the forum I found few codes. Also, from the following links,

I am not sure how to retrieve

IWorkItemCommon workItemCommon = (IWorkItemCommon ) fTeamRepository.getClientLibrary(IWorkItemCommon.class);
Now, I am able to use "workItemCommon", not by using the above line, but it is done using "getService".

Can anyone suggest me whether I did in right way using "getService". Or, how or retrieve "fTeamRepository".


One answer

permanent link
Ralph Schoon (63.3k33646) | answered Jul 25 '17, 3:16 p.m.
edited Jul 25 '17, 3:31 p.m.

You have to distinguish the server and the client API. There are small differences. is client API. The server API is very similar. However getting services and client libraries is different. See for the server API. It uses


to get the service


ITeamRepository.getClientLibrary() only works in the client API, getService() only in the server API if you extend AbstractService.

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.