It's all about the answers!

Ask a question

Bug in Flow target?


Michele Pegoraro (1.8k14119103) | asked May 18 '09, 12:02 p.m.
I've find out something strange. I've got a private workspace which has 3 target delivery. All the connections are made using the Eclipse Client. If I open repository in a view these streams (named ONE, TWO and THREE) and stream UNO is Current and Default target.
I use a class made using PlainJavaAPI that enter the IFlowTable and find which is the Default and the Current entry. I run with this configuration and I got correctly Default and Current on stream ONE. Than I run another class that set Current on stream THREE and Default on stream TWO.
If I use Eclipse client to view flow diagram or stream property I see that nothing seems to change, but if I run my first test class I can see that Current is set to THREE and Default is set to TWO.
I've try to disconnect and reconnect, refresh and restart client but with RTC client I've always see the old configuration instead with API test class I see the new one.
Is there someone that has see something similar or I'm wrong with something??

3 answers



permanent link
Andrew Hoo (1.0k1) | answered May 25 '09, 9:53 a.m.
JAZZ DEVELOPER
The flow diagram does not listen to external changes to a workspace, so it may not accurately show your changes; however, I would have expected it to refresh properly, especially if you're closing and re-creating the diagram (as you say, you've tried completely restarting the client).

You could check to see the flow section of the Repository Workspace Editor as you use your tool as another place to confirm that your tool is updating the repository workspace.

If that does not seem to be updating, I would double check your code that sets the flows. If I recall correctly, The IFlowTable api lets you modify a working copy that you change all you want, but you need to explicitly save it for the changes to be applied. Maybe you're reading back the values on your working copy but haven't yet saved it?


On Mon, 18 May 2009 12:07:35 -0400, mikyjpeg <michele> wrote:

I've find out something strange. I've got a private workspace which
has 3 target delivery. All the connections are made using the Eclipse
Client. If I open repository in a view these streams (named ONE, TWO
and THREE) and stream UNO is Current and Default target.
I use a class made using PlainJavaAPI that enter the IFlowTable and
find which is the Default and the Current entry. I run with this
configuration and I got correctly Default and Current on stream ONE.
Than I run another class that set Current on stream THREE and Default
on stream TWO.
If I use Eclipse client to view flow diagram or stream property I see
that nothing seems to change, but if I run my first test class I can
see that Current is set to THREE and Default is set to TWO.
I've try to disconnect and reconnect, refresh and restart client but
with RTC client I've always see the old configuration instead with
API test class I see the new one.
Is there someone that has see something similar or I'm wrong with
something??




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

permanent link
Michele Pegoraro (1.8k14119103) | answered Jun 04 '09, 3:04 a.m.
As you say, neither the flow section on the Repository Workspace Editor seems to change. This is my code where I set the flow table:


IWorkspaceHandle test = ...
IWorkspaceHandle rilascio = ...

IWorkspaceConnection rilascioConn = ws.getWorkspaceConnection(rilascio, monitor);
IWorkspaceConnection testConn = ws.getWorkspaceConnection(test, monitor);
List<IComponentHandle> components = testConn.getComponents();
IFlowTable testFlowTable = testConn.getFlowTable().getWorkingCopy();
testFlowTable.addDeliverFlow(rilascioConn.getResolvedWorkspace(), null, null, Collections.singletonList(components.get(0)), "ECHEKANT");
List<IFlowEntry> entries = testFlowTable.deliverTargets();
testFlowTable.setCurrent(entries.get(0));
testFlowTable.setDefault(entries.get(0));
testConn.setFlowTable(testFlowTable, monitor);




The flow diagram does not listen to external changes to a workspace, so it may not accurately show your changes; however, I would have expected it to refresh properly, especially if you're closing and re-creating the diagram (as you say, you've tried completely restarting the client).

You could check to see the flow section of the Repository Workspace Editor as you use your tool as another place to confirm that your tool is updating the repository workspace.

If that does not seem to be updating, I would double check your code that sets the flows. If I recall correctly, The IFlowTable api lets you modify a working copy that you change all you want, but you need to explicitly save it for the changes to be applied. Maybe you're reading back the values on your working copy but haven't yet saved it?


On Mon, 18 May 2009 12:07:35 -0400, mikyjpeg <michele> wrote:

I've find out something strange. I've got a private workspace which
has 3 target delivery. All the connections are made using the Eclipse
Client. If I open repository in a view these streams (named ONE, TWO
and THREE) and stream UNO is Current and Default target.
I use a class made using PlainJavaAPI that enter the IFlowTable and
find which is the Default and the Current entry. I run with this
configuration and I got correctly Default and Current on stream ONE.
Than I run another class that set Current on stream THREE and Default
on stream TWO.
If I use Eclipse client to view flow diagram or stream property I see
that nothing seems to change, but if I run my first test class I can
see that Current is set to THREE and Default is set to TWO.
I've try to disconnect and reconnect, refresh and restart client but
with RTC client I've always see the old configuration instead with
API test class I see the new one.
Is there someone that has see something similar or I'm wrong with
something??




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

permanent link
Andrew Hoo (1.0k1) | answered Jun 04 '09, 10:04 a.m.
JAZZ DEVELOPER
Yes, there is a problem, you are changing the 'deliverFlows', when you
should change the 'acceptFlows'.

The flow table API method names are misleading, and it is possible that
we'll be changing this in the future (partially to sort out this confusion
you're experiencing now). The 'acceptFlows' are for the collaborations.
The 'deliverFlows' are for helping identify component additions/removals
(I believe. Somebody correct me if I'm wrong.)

We have an internal helper class
/com.ibm.team.filesystem.rcp.core/src/com/ibm/team/filesystem/rcp/core/internal/changes/model/ComponentFlowUtil.java
where you should look at addCollaboration and setCurrentCollaboration.

Also, there's another helper
FileSystemResourcesPlugin.getActiveWorkspaceManager().setWorkspaceCollaboration(...)
which does some setting and fires an event for the UI to listen to if you
want the Pending Changes View to update itself.

On Thu, 04 Jun 2009 03:08:06 -0400, mikyjpeg
<michele> wrote:

As you say, neither the flow section on the Repository Workspace
Editor seems to change. This is my code where I set the flow table:


IWorkspaceHandle test = ...
IWorkspaceHandle rilascio = ...

IWorkspaceConnection rilascioConn =
ws.getWorkspaceConnection(rilascio, monitor);
IWorkspaceConnection testConn = ws.getWorkspaceConnection(test,
monitor);
List<IComponentHandle> components =
testConn.getComponents();
IFlowTable testFlowTable =
testConn.getFlowTable().getWorkingCopy();
testFlowTable.addDeliverFlow(rilascioConn.getResolvedWorkspace(),
null, null,
Collections.singletonList(components.get(0)),
"ECHEKANT");
List<IFlowEntry> entries =
testFlowTable.deliverTargets();
testFlowTable.setCurrent(entries.get(0));
testFlowTable.setDefault(entries.get(0));
testConn.setFlowTable(testFlowTable,
monitor);



Andrew Hoowrote:
The flow diagram does not listen to external changes to a workspace,
so it may not accurately show your changes; however, I would have
expected it to refresh properly, especially if you're closing and
re-creating the diagram (as you say, you've tried completely
restarting the client).

You could check to see the flow section of the Repository Workspace
Editor as you use your tool as another place to confirm that your
tool is updating the repository workspace.

If that does not seem to be updating, I would double check your code
that sets the flows. If I recall correctly, The IFlowTable api lets
you modify a working copy that you change all you want, but you need
to explicitly save it for the changes to be applied. Maybe you're
reading back the values on your working copy but haven't yet saved
it?


On Mon, 18 May 2009 12:07:35 -0400, mikyjpeg <michele> wrote:

I've find out something strange. I've got a private workspace which
has 3 target delivery. All the connections are made using the
Eclipse
Client. If I open repository in a view these streams (named ONE,
TWO
and THREE) and stream UNO is Current and Default target.
I use a class made using PlainJavaAPI that enter the IFlowTable and
find which is the Default and the Current entry. I run with this
configuration and I got correctly Default and Current on stream
ONE.
Than I run another class that set Current on stream THREE and
Default
on stream TWO.
If I use Eclipse client to view flow diagram or stream property I
see
that nothing seems to change, but if I run my first test class I
can
see that Current is set to THREE and Default is set to TWO.
I've try to disconnect and reconnect, refresh and restart client
but
with RTC client I've always see the old configuration instead with
API test class I see the new one.
Is there someone that has see something similar or I'm wrong with
something??






--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Your answer


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