How to get Baselines of Components in a Stream with RTC Server Side API
![]() Hi,
I have a question. I am trying to develop an RTC follow-up action to create stream automatically. The action will look up the WI, create a stream and add components to that stream according to an attribute on WI. It will select baselines from another stream which consist only production baselines for components.
I managed to get production stream and its components but couldn’t find a way to get their baselines.
IWorkspaceSearchCriteria wsSearchCriteriaforProd = IWorkspaceSearchCriteria.FACTORY.newInstance();
wsSearchCriteriaforProd.setKind(IWorkspaceSearchCriteria.STREAMS);
wsSearchCriteriaforProd.setExactName(streamName);
ItemQueryResult queryResultforStream=scmQuery.findWorkspaces(wsSearchCriteria, Integer.MAX_VALUE,null);
if (queryResultforStream.getItemHandles().isEmpty()) {
for (int i = 0; i < queryResultforStream.getItemHandles().size(); i++) {
IWorkspaceHandle wshandle = (IWorkspaceHandle) queryResultforStream.getItemHandles().get(i);
IWorkspace ws = (IWorkspace) fItemService.fetchItem(wshandle, IRepositoryItemService.COMPLETE);
IComponentHandle[] componentHandles = scmService.getComponentsForWorkspace(wshandle, null);
Do you have any idea?
|
Accepted answer
![]()
David Lafreniere (4.8k●7)
| answered Nov 08 '18, 9:32 a.m.
FORUM MODERATOR / JAZZ DEVELOPER edited Nov 08 '18, 9:32 a.m. You can retrieve the latest baseline (called the basis) of a component in a stream using:
Kurtuluş YILDIRIM selected this answer as the correct answer
|
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.