How can I access the IFlowTable (or equivalent) for a workspace in server-side plugin
I am attempting to set a scoped flow target (only flow specific components within a Stream) for a workspace via a on "Deliver (server)" follow-up action. Consequently I need to use Server-side code.
I've seen code examples on how do this via client-side code (using workspaceConnection.getFlowTable()) but I can't figure out how to get a handle on the FlowTable using server-side APIs. (All examples use IWorkSpaceConnection which I believe is client-side only).
Anyone know how to get a handle on the workspace flow table via server-side apis?
Accepted answer
IFlowTable is the client API abstraction which wraps the IFlowEntry helper, which is part of the IWorkspace object.
The service method that can be used is IScmService#setWorkspaceFlows(). This is not API, but then again, many of the server side interfaces are not API, but stable.
Comments
Thanks John - I've been playing with this method and can get high level flow but can't seem to scope to only a single component.
Here's one of the permutations that seems to make the most sense to me that I've tried:
scmService.setWorkspaceFlows(sourceWorkspaceHandle, af, df, currentFlow, componentList, componentFlowList, null, null)
af - FLOW_IN from Stream
df - FLOW_OUT to Stream
currentFlow - CurrentFlow consisting of af and df
componentList - array of desired componentHandles to be scoped
componentFlowList - list of CurrentFlows with the same af,df as defined above.
When I go edit the flow target it shows that all components are selected...
What am I not understanding for these parameters?
The key to finally getting the flow to be scoped to individual component(s) was to call af.addComponent(componentHandle) on af (and df depending on what you wanted). In addition I had to call af.setDescription("Scoped") and df.setDescription("Scoped") before it would show up correctly in the eclipse client.