It's all about the answers!

Ask a question

[closed] Modify the FlowTarget for a Workspace


Yung-Hsiang Chan (34613) | asked Oct 21 '14, 10:13 p.m.
closed Oct 22 '14, 4:31 a.m. by Ralph Schoon (55.5k23642)
Hi, I want to create a new Workspace Repository which flow with only one  component.
I tried to use the following code.
                IWorkspace iWorkspace = null;
try {
IFlowTable iFlowTable = iWorkspaceConnection.getFlowTable().getWorkingCopy();
IFlowEntry iFlowEntry = iFlowTable.getDefaultDeliverFlow();
iFlowTable.setComponentScopes(iFlowEntry.getFlowNode(),
iComponentHandles);
iWorkspace = iWorkspaceConnection.getResolvedWorkspace();
} catch (Exception e) {
System.out.println(e.getMessage());
}

The created workspace still contain all the components instead of  what I assigned by the following code.

iFlowTable.setComponentScopes(iFlowEntry.getFlowNode(),
iComponentHandles);

where iComponentHandles only have one componenthandle.

Thanks!

The question has been closed for the following reason: "Duplicate Question" by rschoon Oct 22 '14, 4:31 a.m.

2 answers



permanent link
Ralph Schoon (55.5k23642) | answered Oct 22 '14, 4:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Closed as duplicate. See https://jazz.net/forum/questions/166114/setting-flowtarget-while-creating-workspace

permanent link
Yung-Hsiang Chan (34613) | answered Oct 22 '14, 4:51 a.m.
I solved the problem finally.

I should add iWorkspaceConnection.setFlowTable(iFlowTable, monitor); in the end.

Thanks!