Workspace deliver and accept flow entries , help! [resolved]
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
setCurrent(IFlowEntry entry)
setDefault(IFlowEntry entry)
Indicates that the specified entry is the default one for the workspace for this direction (Accept or Deliver).
Accepted answer
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
Comments
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
great, thanks.. I'll comment out my accept flow support.
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
I have a followup question.
when we duplicated the workspaces from server 1 to server 2, I didn't notice the flow target info.
so it was not updated. so the workspace handles are from server1's repository..
now we have duplicated the workspaces to server 3. I have a manual mapping file (uuids of workspaces on server 1 to workspace name on server 3)
now I need to fix the workspaces in the flow targets.
the UI lets me remove ONE of potentially many. 'missing 'uuid'"
but the only api I see are
|
|
but the handle is invalid for this repository, and an exception is thrown.
I haven't tried to look at the product source yet for the workspace editor
![](http://jazz.net/_images/myphoto/dbae95bdb19ad8361907d9b236827b71.jpg)
Can you post the exception that you're getting and maybe a snippet of your code? That might help determine why it didn't work.
If you're ok logging in to all of your servers at the same time, you can do that from the Eclipse client to resolve the flow targets. Any that are still unresolved don't exist and can be removed and you'll be able to see the ones that you want to remove.
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
thanks for making me look closer.. I was trying to use the workspace handle instead of the flownode entry.
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
sorry, I must be blind.. where is save workspace?
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
seems this is built in.. you change the description and the workspace gets updated..
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
one more small question..
![](http://jazz.net/_images/myphoto/dbae95bdb19ad8361907d9b236827b71.jpg)
The Eclipse workspace editor has its own notion of a working copy. When the user saves, the necessary operations are performed on the workspace to give the user a feeling of editing and saving a workspace as a transaction.
The current flow entry and default flow entry is not required. However, it is useful so that RTC clients can select and identify flow targets if no flow target is specified. If you're writing code, workspace comparisons and deliver/accept operations require a target to be specified. There is no API that will automatically perform those operations using the current or default flow target.
In terms of what users would care about, the current flow target is what the Eclipse Pending Changes shows. The default is used for letting the user quickly select the specified default flow target when changing flow targets. Users can set these in the workspace editor.
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
thanks.. the workspace I am looking at has one target stream. and its set as current and default. the stream handle is not valid, cause it is on a repository we cannot connect to.
![](https://jazz.net/forum/upfiles/flowtarget.jpg)
java.util.List
|
deliverTargets()
Returns all deliver targets in table. |
![](http://jazz.net/_images/myphoto/dbae95bdb19ad8361907d9b236827b71.jpg)
I don't see how removing the last flow table entry causes #deliverTargets() to return null. You might want to open a bug report about this and state platform and the JVM version that you're using. This might be something specific to your configuration. The #deliverTargets() method calls Collections#unmodifiableList(..) and if the deliverTargets list was null then that would NPE.
I'm not sure what you expect from the current and default flow targets. If your cleanup removes flow targets that are current or default then those will be unset. The Javadoc might not be clear enough but calls to remove a flow target state they will remove all flow entries for the specified target.
Also, it is valid for there to be no current or default flow target. The Javadoc is clear that getting those entries may return null. The Eclipse client does add a current flow when the workspace has its first flow target set. However, manipulating the flow table yourself will not set a current or default flow target automatically for you.
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
I am still having trouble setting current/default
I got the flow table working copy and am processing that. there is one FlowEntry,
and its set current/default.
if I delete the one entry then current/default get cleared, so I have to save the fact and detail in case there are more than one flow entry when processed later.
if I delete the one flow entry, then try to unset current or default, I get an exception, cause its not set (see the cleanup side effect above).
so I add the new flow entry with the right workspace connection.
Now I want to set IT as current..
but I don't have its FlowEntry object.
so I have to loop back thru the table to get it out..
but using THAT to set the default, throws an exception, cause it appears I haven't written the flow table back yet, and the objects don't match. (the check flowintable returns false).
I don't see a method to add by passing a flowentry (create one, add it, make it default/current)
![](http://jazz.net/_images/myphoto/dbae95bdb19ad8361907d9b236827b71.jpg)
Can you provide a snippet of your code where you set the current or default flow entry or even the exception message? It's hard to tell if there's anything wrong with your code without looking at it or seeing the error.
You don't have to unset the current or default if the entry was removed from the flow table. It would be better to check if a current or default is set and set one if there is none. To get your flow entry, you can use the workspace handle and call IFlowTable#getDeliverFlow(..) to get the flow entry that you just added. Then add this entry as the current and default flows.
2 other answers
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
Comments
![](http://jazz.net/_images/myphoto/dbae95bdb19ad8361907d9b236827b71.jpg)
I would open a bug against Source Control about this. It looks like you get the NPE when you copy a workspace from server 1 to server 2 and call #deliverTargets() on the copy's flow table. Include the version and type of VM that you're using. It looks like the error occurs in the iterator, which may be an issue in RTC or in the VM.
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
and it only happens when you try to connect to the bad flow node first.
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
user error.. I was modifying the list over which an implied iterator was traversing.
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)
fix posted to the above code lest anyone copy it
![](http://jazz.net/_images/myphoto/d0f7b0b7bfc90721959d790b8a9bf79f.jpg)