It's all about the answers!

Ask a question

How to create a stream from a snapshot programatically?


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

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 (3.7k7) | answered Jan 11, 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.