It's all about the answers!

Ask a question

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


Alex K. (132) | asked May 17, 10:13 a.m.

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. 

Accepted answer


permanent link
Shashikant Padur (4.2k27) | answered May 18, 12:43 a.m.
JAZZ DEVELOPER

 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

Your answer


Register or to post your answer.