How to get a default flow target of IWorkspace (server-side)?
Dong Young Kim (193●19●20)
| asked Jun 18 '12, 5:27 a.m.
JAZZ DEVELOPER retagged Jun 18 '12, 10:35 a.m. by Evan Hughes (2.4k●13●18)
I'm going to deliver a change set to a default target when a work item is resolved.
I've got IWorkspace (Repository Workspace) from IChangSet but don't know flow target IWorkspace (Stream). I tried the code below but query result was empty. IWorkspaceSearchCriteria criteria1 = IWorkspaceSearchCriteria.FACTORY.newInstance() .setFlowFilter(sourceHandle, FlowFlags.ACCEPT ).setKind(IWorkspaceSearchCriteria.STREAMS); List<IWorkspaceHandle> workspaceHandles1 = (List<IWorkspaceHandle>) query.findWorkspaces(criteria1, Integer.MAX_VALUE, null).getItemHandles(); if(workspaceHandles1.size() > 0) { IWorkspaceHandle targetHandle1 = workspaceHandles1.get( 0 ); System.err.println("source flow target : " + targetHandle1.getItemId()); //IWorkspace target1 = (IWorkspace)itemService.fetchItem(targetHandle1, null); } Give me some hints on this. Thx. |
2 answers
You would need to look at the internal Workspace interface:
<tt>Workspace.getCurrentFlows()</tt> and <tt>CurrentFlows#getDefaultAcceptFlow() CurrentFlows#getDefaultDeliverFlow()</tt> |
Thx.
I casted IWorkspace to Workspace and get the flow target. Workspace.getCurrentFlows() and CurrentFlows#getDefaultDeliverFlow() |
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.