It's all about the answers!

Ask a question

How to retrieve IFlowNodeConnection with plain Java API


Luca Martinucci (1.0k294112) | asked Sep 13 '16, 11:23 a.m.
edited Sep 14 '16, 7:48 a.m. by David Lafreniere (4.8k7)
How can I retrieve an IFlowNodeConnection object, having an IWorkspace object, with plain Java API?
RTC version is 5.0.2.

Accepted answer


permanent link
Luca Martinucci (1.0k294112) | answered Sep 14 '16, 5:13 a.m.
edited Sep 14 '16, 7:50 a.m. by David Lafreniere (4.8k7)
I found out how to do this (actually, very easy).

By using a WorkspaceManager object:

IWorkspaceHandle wsHandle = (IWorkspaceHandle) workspace.getItemHandle();
IWorkspaceConnection wsConnection = workspaceManager.getWorkspaceConnection(wsHandle, null);
IFlowNodeConnection flowNodeConn = (IFlowNodeConnection) wsConnection;
David Lafreniere selected this answer as the correct answer

Comments
1
David Lafreniere commented Sep 14 '16, 7:52 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

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.


Luca Martinucci commented Sep 14 '16, 10:02 a.m.

Thanks for your suggestions, I will try them.


Luca Martinucci commented Sep 15 '16, 3:57 a.m.

It works; thank you very much.

Your answer


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