How to Set Flowcontrol using server API in scm
How to Set Flowcontrol using server API in scm as show in image |
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Oct 30, 3:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Oct 30, 3:32 a.m. I don't know the SCM server APIs.
private void setFlow(IWorkspaceConnection source, IWorkspaceConnection dest, Collection<icomponenthandle> components, IProgressMonitor monitor) throws TeamRepositoryException { // Get the current flow table IFlowTable cflowTable = source.getFlowTable().getWorkingCopy(); // Set the accept and deliver flow to the target cflowTable.addAcceptFlow(dest.getResolvedWorkspace(), dest .teamRepository().getId(), dest.teamRepository() .getRepositoryURI(), components / Collections.EMPTY_LIST /, "Accept Flow"); cflowTable.addDeliverFlow(dest.getResolvedWorkspace(), dest .teamRepository().getId(), dest.teamRepository() .getRepositoryURI(), components / Collections.EMPTY_LIST /, "Deliver Flow"); // Limit the scope for accept and delivery to the components that are // needed cflowTable.setComponentScopes(dest.getResolvedWorkspace(), components); // We want incoming and outgoing default and current flow // Set the incoming flow for current and default IFlowEntry acceptEntry = cflowTable.getAcceptFlow(dest .getResolvedWorkspace()); cflowTable.setCurrent(acceptEntry); cflowTable.setDefault(acceptEntry); // Set the incoming flow for current and default IFlowEntry deliverEntry = cflowTable.getDeliverFlow(dest .getResolvedWorkspace()); cflowTable.setCurrent(deliverEntry); cflowTable.setDefault(deliverEntry); |
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.