Automatic flow between streams
We moved to a new project and migrated some of our workitems. We also created a new stream that is based on a synchronized stream from the old project. The new stream has the old stream as a target flow , but it doesn't seem to be that the changes flow between the streams. My questions are
1. How can automate the flow of changes between two streams?
2. Can you turn an existing stream to a synchronized stream?
3. What are the implications of associating our old stream with the new project? Does old workitems change-set linkage will still work?
1. How can automate the flow of changes between two streams?
2. Can you turn an existing stream to a synchronized stream?
3. What are the implications of associating our old stream with the new project? Does old workitems change-set linkage will still work?
13 answers
The "Accept changes before load" just does an "accept", which flows the
changes from the Workspace's Stream into the Workspace. So all that
build would do is keep the Workspace up-to-date WRT its stream ... it
has no effect on either of the streams.
Cheers,
Geoff
travman wrote:
changes from the Workspace's Stream into the Workspace. So all that
build would do is keep the Workspace up-to-date WRT its stream ... it
has no effect on either of the streams.
Cheers,
Geoff
travman wrote:
gmclemmwrote:
Yes, currently that stream-stream flow link is just for documentation
(has no semantics). I have submitted a work item, suggesting that
we
give that link some semantics (workitem 86817).
Would this work (I don't have a sandbox and build server to play
with):
1. Make two streams, "Dev Stream," which all the developers
target, and "Dev Stream's Flow Target Stream", which no one
targets.
2. Edit the "Dev Stream," and add "Dev Stream's Flow
Target Stream" as a flow target.
3. Create a workspace for a build, targeting "Dev Stream's Flow
Target Stream."
4. Check the "Accept changes before load" checkbox, and do
something innocuous in the build, as in nothing.
5. Schedule the build every 30 minutes.
Would changes flow from stream to stream in that case?
We have the following flow diagram:
We implemented a follow-up action to delivery the change-set from wks to stream A even to stream B:
What is the method to get the flow targets (i.e., the stream B) from the "streamA" object (i.e., the stream A)?
Indeed, does such a method exist? We did not find it on server APIs...
In a Plain Java Client we can use the "IWorkspaceManager" to obtain the "IFlowTable":
Thanks in advice.
wks --> stream A --> stream B
We implemented a follow-up action to delivery the change-set from wks to stream A even to stream B:
public void run(AdvisableOperation operation, ...) {
Object opData = operation.getOperationData();
if (!(opData instanceof DeliverOperationData)) {
return;
}
DeliverOperationData data = (DeliverOperationData) opData;
IWorkspace flowTarget = data.getDestWorkspace();
if (!flowTarget.isStream()) {
return;
}
IWorkspace streamA = flowTarget;
IWorkspace streamB = //streamA.getDefaultDeliverFlow(); ???
List<IChangeSetHandle> cshList = data.getChangeSetHandles();
// ...
IScmService scmService = (IScmService) getService(IScmService.class);
scmService.deliverCombined(streamA, null, streamB, new IBaselineHandle[0], cshList.toArray(new IChangeSetHandle[cshList.size()]), IScmService.DELTA_PER_INVOCATION, IScmService.DELTA_PER_INVOCATION, null, null);
}
What is the method to get the flow targets (i.e., the stream B) from the "streamA" object (i.e., the stream A)?
Indeed, does such a method exist? We did not find it on server APIs...
In a Plain Java Client we can use the "IWorkspaceManager" to obtain the "IFlowTable":
public static void main(String[] args) {
// ...
ITeamRepository repo = ...
IWorkspaceHandle wsh = ...
IWorkspaceManager wsManager = SCMPlatform.getWorkspaceManager(repo);
IWorkspaceConnection wsConnection = wsManager.getWorkspaceConnection(wsh, null);
IFlowTable flowTable = wsConnection.getFlowTable();
IFlowEntry flowEntry = flowTable.getDefaultDeliverFlow();
IFlowNode flowNode = (IFlowNode) repo.itemManager().fetchCompleteItem(flowEntry.getFlowNode(), ItemManager.DEFAULT, null);
IWorkspace streamB = null;
if (flowNode instanceof IWorkspace) {
streamB = (IWorkspace) flowNode;
}
// ...
}
Thanks in advice.
Note: If you don't get a reply in this forum in a reasonable amount of time, you probably want to try to post the question in the "Extending Team Concert" forum, which is where most of the coding discussions take place.
Cheers,
Geoff
Cheers,
Geoff
We have the following flow diagram:wks --> stream A --> stream B
We implemented a follow-up action to delivery the change-set from wks to stream A even to stream B:public void run(AdvisableOperation operation, ...) {
Object opData = operation.getOperationData();
if (!(opData instanceof DeliverOperationData)) {
return;
}
DeliverOperationData data = (DeliverOperationData) opData;
IWorkspace flowTarget = data.getDestWorkspace();
if (!flowTarget.isStream()) {
return;
}
IWorkspace streamA = flowTarget;
IWorkspace streamB = //streamA.getDefaultDeliverFlow(); ???
List<IChangeSetHandle> cshList = data.getChangeSetHandles();
// ...
IScmService scmService = (IScmService) getService(IScmService.class);
scmService.deliverCombined(streamA, null, streamB, new IBaselineHandle[0], cshList.toArray(new IChangeSetHandle[cshList.size()]), IScmService.DELTA_PER_INVOCATION, IScmService.DELTA_PER_INVOCATION, null, null);
}
What is the method to get the flow targets (i.e., the stream B) from the "streamA" object (i.e., the stream A)?
Indeed, does such a method exist? We did not find it on server APIs...
In a Plain Java Client we can use the "IWorkspaceManager" to obtain the "IFlowTable":public static void main(String[] args) {
// ...
ITeamRepository repo = ...
IWorkspaceHandle wsh = ...
IWorkspaceManager wsManager = SCMPlatform.getWorkspaceManager(repo);
IWorkspaceConnection wsConnection = wsManager.getWorkspaceConnection(wsh, null);
IFlowTable flowTable = wsConnection.getFlowTable();
IFlowEntry flowEntry = flowTable.getDefaultDeliverFlow();
IFlowNode flowNode = (IFlowNode) repo.itemManager().fetchCompleteItem(flowEntry.getFlowNode(), ItemManager.DEFAULT, null);
IWorkspace streamB = null;
if (flowNode instanceof IWorkspace) {
streamB = (IWorkspace) flowNode;
}
// ...
}
Thanks in advice.
page 2of 1 pagesof 2 pages