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

How to retrieve IFlowNodeConnection with plain Java API

How can I retrieve an IFlowNodeConnection object, having an IWorkspace object, with plain Java API?
RTC version is 5.0.2.

0 votes


Accepted answer

Permanent link
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

1 vote

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.

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,926
× 1,201
× 169

Question asked: Sep 13 '16, 11:23 a.m.

Question was seen: 3,136 times

Last updated: Sep 15 '16, 3:57 a.m.

Confirmation Cancel Confirm