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

Getting access to a Stream

Hello,

I have a stream name Stream_One
And a workspace based on it named Workspace_Stream_One

With the Api Java I can get the workspace fine doing :


IWorkspaceSearchCriteria wsSearchCriteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
wsSearchCriteria.setKind(IWorkspaceSearchCriteria.WORKSPACES);
wsSearchCriteria.setPartialOwnerNameIgnoreCase(null);
wsSearchCriteria.setExactName("Workspace_Stream_One");

List <IWorkspaceHandle> workspaceHandles = wm.findWorkspaces(wsSearchCriteria, Integer.MAX_VALUE, this.monitor.getChild());

IWorkspaceConnection conn = wm.getWorkspaceConnection(workspaceHandles.get(0), monitor.getChild());


I can get the Stream easily doing :


IWorkspaceSearchCriteria wsSearchCriteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
wsSearchCriteria.setKind(IWorkspaceSearchCriteria.STREAMS);
wsSearchCriteria.setPartialOwnerNameIgnoreCase(null);
wsSearchCriteria.setExactName("Stream_One");

List <IWorkspaceHandle> workspaceHandles = wm.findWorkspaces(wsSearchCriteria, Integer.MAX_VALUE, this.monitor.getChild());

IWorkspaceConnection conn = wm.getWorkspaceConnection(workspaceHandles.get(0), monitor.getChild());


But How can I get the Stream Object from the Workspace Object not knowing the Stream name ?

Thank you for your support

0 votes



One answer

Permanent link
But How can I get the Stream Object from the Workspace Object not knowing the Stream name ?
Thank you for your support


In this example, the assumption we're making is that the Stream is the default flow target of that workspace. However keep in mind that you can remove this Stream from it's list of flow targets (open the workspace editor and look at the Flow Targets below)... it can get even more confusing because components within that workspace can flow with other streams (and thus there is not a 1:1 relationship between a workspace and a stream). Take a look through IWorkspaceConnection.getFlowTable() to get an idea of where this workspace is flowing to.

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

Question asked: May 12 '11, 12:24 p.m.

Question was seen: 4,504 times

Last updated: May 12 '11, 12:24 p.m.

Confirmation Cancel Confirm