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

How to get a default flow target of IWorkspace (server-side)?

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.

0 votes



2 answers

Permanent link
You would need to look at the internal  Workspace interface:
<tt>Workspace.getCurrentFlows()</tt> and
<tt>CurrentFlows#getDefaultAcceptFlow() CurrentFlows#getDefaultDeliverFlow()</tt>

1 vote


Permanent link
Thx.

I casted IWorkspace to Workspace and get the flow target.

Workspace.getCurrentFlows() and
CurrentFlows#getDefaultDeliverFlow()

1 vote

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

Question asked: Jun 18 '12, 5:27 a.m.

Question was seen: 5,256 times

Last updated: Jun 19 '12, 9:01 p.m.

Confirmation Cancel Confirm