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

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

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;
}

0 votes



One answer

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

0 votes

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,951

Question asked: Apr 17 '14, 9:49 a.m.

Question was seen: 4,541 times

Last updated: Apr 17 '14, 10:19 a.m.

Confirmation Cancel Confirm