It's all about the answers!

Ask a question

Replacing baselines - difference in behaviour bewteen the Plain API and the RTC client


Zoe Slattery (4011520) | asked May 16 '14, 8:37 a.m.
I'm using the 4.0.6 RTC client and API with a 4.0.6 server.

The sequence of operations I am trying to do is:

1) Create a workspace from a snapshot of a stream
2) Replace component baselines in the workspace with baselines at a known level (not the most recent).
3) Make a snapshot of the workspace
4) Create a second workspace from the new snapshot

If I set the flow target of the second workspace to the stream I would expect to see incoming (newer)  baselines from the stream, as indeed I do whether I do this using the API of the RTC GUI.

However - if I do it using the API I also see an outgoing change which is the baseline that I replaced. This baseline is exactly the same same as the one in the stream (compare) but if I deliver it it resets the stream history . This is not the behaviour I want.

I expect that I am probably using the API incorrectly, here is the code that does the replacement:

 public IWorkspaceConnection replaceComponentInWorkspaceConnection(
            IWorkspaceConnection workspaceConnection,
            IComponentHandle componentHandle, IConnection baseline,
            IProgressMonitor monitor) throws TeamRepositoryException {
  
       
            workspaceConnection.applyComponentOperations(Collections
                    .singletonList(workspaceConnection.componentOpFactory()
                            .replaceComponent(componentHandle, baseline, false)), true, monitor);
           
               
        return workspaceConnection;
    }

Is there something obvious that I am doing wrong? Or a better way to do what I want?




One answer



permanent link
Zoe Slattery (4011520) | answered May 16 '14, 12:19 p.m.
Further testing on a separate system shows that my API code works in exactly the same way as the RTC Client. So, I'm suspecting now that there is a problem with our production server set up. Anyway - I no longer have a question about differences between the API and the client which is progress, I suppose.


Your answer


Register or to post your answer.