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.
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.