It's all about the answers!

Ask a question

Follow Action/Precodition problem updated from RTC3.0.1 To RTC4.0.6


silencehill wu (5022732) | asked Apr 17 '14, 9:49 a.m.

Follow Action problem updated from RTC3.0.1 To RTC4.0.6

Now I met some problem when I update my server from RTC3.0.1 to RTC4.0.6.

I have some precondition and follow action written which runs well for RTC3.0.1.But last day, I update all my RTC-SDK and RTC client and RTC Servet to  4.0.6. The error occured.

First problem, I still can press 'build all' button in update site project to build the old  plug-in project without error in RTC 4.0.6  developping enviroment, but when the follow action is triggered after deploying in server side, the error message with "No method found occur". I don't know why it happened after compile correctly.


Second, I can not found com.ibm.team.repository.common in the dependencies tab page. It can be found in the RTC3.0.1. So,what's happy?which plug-in replaced it?

where is the com.ibm.team.repository.common plug-in

Third problem, it seems that the error occured on findWorkspaces api of SCMQueryService class. No this method found.Is the method deprecated? Please tell me which API should I used to to search a stream to fit my original logic.

ItemQueryResult result= scmQuery.findWorkspaces(searchExistingStreams, Integer.MAX_VALUE, null);
for (Object stream : result.getItemHandles()) {
 if (stream instanceof IWorkspaceHandle) {
  wsHandleList.add((IWorkspaceHandle)stream);
 }
}.

below is the original API for RTC3.0.1 :
public List<IWorkspaceHandle> findWorkspacesHandleByStreamNamePrefix(String streamNamePrefix) throws TeamRepositoryException {
 List<IWorkspaceHandle> wsHandleList = new ArrayList<IWorkspaceHandle>();
 IWorkspaceSearchCriteria searchExistingStreams= IWorkspaceSearchCriteria.FACTORY.newInstance();
 searchExistingStreams.setKind(IWorkspaceSearchCriteria.STREAMS);
 searchExistingStreams.setPartialOwnerName("%_DEV");
 searchExistingStreams.setPartialName(streamNamePrefix);
 ItemQueryResult result= scmQuery.findWorkspaces(searchExistingStreams, Integer.MAX_VALUE, null);
 for (Object stream : result.getItemHandles()) {
  if (stream instanceof IWorkspaceHandle) {
   wsHandleList.add((IWorkspaceHandle)stream);
  }
 }
 return wsHandleList;
}

One answer



permanent link
sam detweiler (12.5k6195201) | answered Apr 17 '14, 10:19 a.m.
edited Apr 17 '14, 10:19 a.m.
I don't know about scmquery service...

my code (just written on 4.0.4) uses
final IWorkspaceManager prodmgr = SCMPlatform.getWorkspaceManager(repository);
prodmgr.findWorkspaces(workspacesearchcriteria,  IWorkspaceManager.MAX_QUERY_SIZE, null);

the same code worked on 3.0.1 as well.

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.