It's all about the answers!

Ask a question

How to create a stream from a snapshot programatically?


vinitha dsouza (147223136) | asked May 30 '17, 10:03 a.m.
edited Jan 11 '19, 4:14 p.m. by David Lafreniere (4.8k7)

hello team

I am trying to create a new Stream using snapshot. The following code executes without any error. It created the stream but there is no component or snapshot associated with the stream.

part of the code snippet:

stream = manager.createStream(project, streamName, description, monitor);
stream.addBaselineSet(ibaselineset, monitor);

 Any help is appreciated.


Comments
Ralph Schoon commented May 30 '17, 10:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Jan 11 '19, 4:13 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

After creating a new snapshot, you can use IComponentOpFactory.addComponent(...), and seed it with the BaselineConnection. You would do this for each baseline in the Snapshot. When done use IWorkspaceConnection#applyComponentOperations(...)

Ralph Schoon selected this answer as the correct answer

Your answer


Register or 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.