How do I change a workspace into a stream?
Hi everyone,
my need is to create a Stream that is a copy/clone of a production Stream.
I thought about two ways of doing that:
-create an empty Stream and then fill it with Components from the Production Stream.
-create a workspace with 'copyWorkspace(...)' and then change this workspace in a stream
There is a method isStream() to check if a IWorkspaceConnection points to a Stream, is there a way to set the workspace to be/become a stream?
Thanks in advance,
Giacomo
Accepted answer
Giacomo,
There is no way to convert a workspace to a stream. Your first option is
the way to go (i.e. create a new stream and perform an Add Component and
choose the "from other workspace or stream" option. Of course, this
could be a pain if you have a lot of components so what you could do is
create an empty stream and then create a workspace off of the existing
stream and load the workspace into the pending changes view without
loading the content )I think this is the forth option on the load
wizard). You can then change the flow target of the workspace to the new
stream and deliver all the component additions into the new stream.
Michael
Comments
Thanks Michael,
I did it somehow. I used the second option: the copyWorkspace() method. IWorkspaceConnection can represent both a WorkspaceConnection or a StreamConnection. So passing as argument an IWorkspaceConnection that points to a Stream, it creates a Stream
IWorkspaceConnection UDC = wm.copyWorkspace(projectArea, envStreamConn, UDCName, UDCDescr, null);
Instead of ProjectAreaHandle the TeamAreaHandle should be used for Streams, and ContributorHandle for Workspaces.
Hope this could be correct.
Bye
Giacomo