It's all about the answers!

Ask a question

Getting the stream to which the changesets are flowing in currently


Anjaly Bastian (1168) | asked May 27 '13, 6:31 a.m.
edited May 27 '13, 7:54 a.m. by Ralph Schoon (56.6k23642)
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

Comments
Tim Mok commented May 27 '13, 9:33 a.m.
JAZZ DEVELOPER

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.


Anjaly Bastian commented May 27 '13, 10:44 p.m.

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
Tim Mok (6.6k38) | answered May 28 '13, 9:38 a.m.
JAZZ DEVELOPER
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.

Comments
Tim Mok commented May 28 '13, 9:39 a.m.
JAZZ DEVELOPER

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.


Anjaly Bastian commented May 29 '13, 11:42 p.m. | edited May 30 '13, 9:15 a.m.

 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?


Tim Mok commented May 30 '13, 9:18 a.m.
JAZZ DEVELOPER

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 to post your answer.