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

RTC api: Get the human readable name of the current flow target

Hello friends, 


my first question here. 
I need support by finding the human readable name of the flow target.
The eclipse plug-in manages it some how, so I would like to do it as well, because we need that name for our logic.

I have already a lot of information, like: 
ITeamRepository repo = (ITeamRepository) selectedSnapshotCandidate.getOrigin();
IWorkspaceHandle currentFlowTarget2 = rtcHandler.getCurrentFlowTarget();
IWorkspaceManager workspaceManager = SCMPlatform.getWorkspaceManager(repo);
IWorkspaceConnection workspaceConnection;
try {
workspaceConnection = workspaceManager.getWorkspaceConnection(currentFlowTarget2, null);
} catch (TeamRepositoryException e) {
throw new RuntimeException("Cannot create stream connection", e);
}
IFlowEntry currentAcceptFlow = workspaceConnection.getFlowTable().getCurrentAcceptFlow();

But I can't get its name! The name attribute returns the server adress.
Any help would be highly appreciated. 

0 votes


Accepted answer

Permanent link

 IFlowEntry currentAcceptFlow = workspaceConnection.getFlowTable().getCurrentAcceptFlow();

IFlowNodeHandle currentAcceptFlowHandle = currentAcceptFlow.getFlowNode();
if (currentAcceptFlowHandle instanceof IWorkspaceHandle) {
    IWorkspaceConnection currentAcceptFlowConnection = workspaceManager.getWorkspaceConnection((IWorkspaceHandle) currentAcceptFlowHandle, null);
    String currentAcceptFlowName = currentAcceptFlowConnection.getResolvedWorkspace().getName();
}

Alex K. selected this answer as the correct answer

0 votes

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,935
× 457
× 5

Question asked: May 17 '21, 10:13 a.m.

Question was seen: 972 times

Last updated: May 18 '21, 12:43 a.m.

Confirmation Cancel Confirm