Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?

0 votes



13 answers

Permanent link
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:
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?

0 votes


Permanent link
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.

0 votes


Permanent link
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

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.

0 votes

1–15 items
page 2of 1 pagesof 2 pages

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 02 '09, 1:00 p.m.

Question was seen: 11,101 times

Last updated: Mar 02 '09, 1:00 p.m.

Confirmation Cancel Confirm