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

Getting the stream to which the changesets are flowing in currently

Out of the many streams that i created, I want to read, using RTC SDK,  that particular stream to which currently the change sets are flowing in that project area. Is there a way to get the same using RTC SDK

0 votes

Comments

Can you clarify what you mean by change sets flowing in a project area? Change sets don't flow in a project area. You can have flow targets on streams and repository workspaces and that shows intent to deliver/accept changes to/from other streams and repository workspaces.

I have created 3 streams, say stream 1, stream 2, stream 3. stream 3 would be my latest created stream. But in my repository workspace I have given stream 2 as flow target.Using RTC SDK how would I read stream 2, i.e the stream where my latest components would be available.I tried the below search criteria:-

 final IWorkspaceSearchCriteria workspaceSearchCriteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
workspaceSearchCriteria.setKind( IWorkspaceSearchCriteria.STREAMS ); workspaceSearchCriteria.setOldestFirst( true  workspaceSearchCriteria.setExactOwnerName( projectName );.

But this returns stream 3. What should be the search criteria when i want to read the stream to which currently the flow is going in.



One answer

Permanent link
It sounds like you just want the reference to the IWorkspaceConnection for the stream. If you are looking for the workspace's flow target, you can get it through the flow table.

workspace.getFlowTable().getCurrentDeliverFlow()

The workspace is your repository workspace that is currently flowing with stream 2.

Your current method of performing a workspace search would likely return all 3 streams if they are all owned by the same project area. Setting the sort to the oldest first is also unreliable as the criteria isn't documented so I don't know what the resulting order would be or how you would want to determine which result is the stream you want.

0 votes

Comments

To expand on my answer, the current deliver flow from the flow table would give you the flow entry. You'll have to get the flow node from the entry, which would be your IWorkspaceHandle for the stream.

 So getCurrentDeliverFlow() for stream 2 would give a not null value and for stream 1 and stream 3, it would be null as the latest deliver flow is to stream2. Is my understanding correct?

Now, I'm not sure if I've understood your question. #getCurrentDeliverFlow() returns one flow entry representing the flow target. There cannot be more than one current flow target.

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
× 11,007

Question asked: May 27 '13, 6:31 a.m.

Question was seen: 5,790 times

Last updated: May 30 '13, 9:18 a.m.

Confirmation Cancel Confirm