How to retrieve IFlowNodeConnection with plain Java API
Accepted answer
I found out how to do this (actually, very easy).
By using a WorkspaceManager object:
IWorkspaceHandle wsHandle = (IWorkspaceHandle) workspace.getItemHandle();
IWorkspaceHandle wsHandle = (IWorkspaceHandle) workspace.getItemHandle();
IWorkspaceConnection wsConnection = workspaceManager.getWorkspaceConnection(wsHandle, null);
IFlowNodeConnection flowNodeConn = (IFlowNodeConnection) wsConnection;
Comments
Notes:
-There is no need for the first line (to cast to IWorkspaceHandle), an IWorkspace already is an IWorkspaceHande.
-Generally there's not much need for the 3rd line either. A IWorkspaceConnection is an IFlowNodeConnection (i.e it already has access to the API in IFlowNodeConnection), so your code can pass around an IWorkspaceConnection and work just fine.
1 vote
Thanks for your suggestions, I will try them.
It works; thank you very much.