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

How to get the corresponding stream of a known workspace?

 Hi, now I have the UUID of the build workspace, how can I get its flow target stream?

0 votes



One answer

Permanent link
First, you have to retrieve the IWorkspace object for the build workspace from the UUID param:
UUID uuid = ...
IWorkspaceHandle wksH = IWorkspace.ITEM_TYPE.createItemHandle(uuid, null);
IRepositoryItemService itemService = getService(IRepositoryItemService.class);
IWorkspace wks = itemService.fetchItem(wksH, IRepositoryItemService.COMPLETE);
Then, you can retrieve the flows from that workspace:
List<FlowEntry> flows = ((Workspace) wks).getFlows(); 
	
Notice you have to cast the IWorkspace object to a Workspace object to invoke the getFlows() method.
Finally, you will have to filter that list to get only the deliver targets:
if ((flow.getFlags() & FlowFlags.DELIVER) != 0) {
    // ...
}
Cheers.

0 votes

Comments

Thanks a lot for your solution, it works properly for me!

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

Question asked: May 20 '15, 2:00 a.m.

Question was seen: 2,442 times

Last updated: May 20 '15, 4:55 a.m.

Confirmation Cancel Confirm