title: Get Stream from ProjectArea using RTC API 4
body: <p>Hello I have been trying to get the stream name using projectArea.
  I have the following parameter:
  Repository
  IFileItem
  WorkItem and its ChangeSets</p>
  
  <p>Is it possible to get it.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Please don't give me a link to the advisor example as I already read it and I couldn't make it.</p>
  
  <p>At this post,it was mentioned the following :
  <a href="https://jazz.net/forum/questions/49910/how-to-get-an-iconfiguration-from-ichangeset" rel="nofollow">https://jazz.net/forum/questions/49910/how-to-get-an-iconfiguration-from-ichangeset</a></p>
  
  <blockquote>
    <p>There is a hint that is often useful (but not necessarily always
    correct), hidden in the ILink which serves as the binding between the
    IChangeSetHandle (source) and the IWorkItemHandle (target). The
    IItemReference for the source side has a String extraInfo field which
    can be retrieved via IItemReference#getExtraInfo(). This string will
    be of the format IWorkspace= which indicates the originating
    workspace. You can create a handle to the IWorkspace by using
    IWorkspace.ITEM_TYPE.createItemHandle(suppliedUUID, null).</p>
  </blockquote>
  
  <pre><code>public void testWorkspaceConnection(ITeamRepository repository, IWorkItem workItem) throws TeamRepositoryException, IOException{
         List&lt;ILink&gt; changeSetLinks = (List&lt;ILink&gt;)linkCollection.getLinksById("com.ibm.team.filesystem.workitems.change_set");
         List&lt;IReference&gt; changeSetReferences = new ArrayList&lt;IReference&gt;();
  
           for (ILink link : changeSetLinks) {
              changeSetReferences.add(link.getSourceRef());
           }
  
           List&lt;IItemHandle&gt; itemHandles = new ArrayList&lt;IItemHandle&gt;();
  
           for (IReference reference : changeSetReferences) {
               itemHandles.add((IItemHandle)reference.resolve());
           }
  
           if(itemHandles.isEmpty()){
               return;
           }
  
           IItemHandle itemHandle = itemHandles.get(itemHandles.size() - 1);
           IChangeSet changeSet = (IChangeSet)repository.itemManager().fetchCompleteItem(itemHandle, 0, monitor);
           List changes = changeSet.changes();         
  
           IFileItem fileItem = getLogidiagFile(changeSet, repository);
           // TILL HERE THAT WAS AN EXISTING CODE THAT WAS ALREADY THERE AND IT FETCHES THE REQUIRED FILE.
           //NEXT IS WHAT |'VE ADDED TO BE ABLE TO DETERMINE THE FULL PATH
           String uuid=changeSetReferences.get(changeSetReferences.size()-1).getExtraInfo(); //Here I need to get workspace uuid to be abble to create a connection over as the post said
           IWorkspaceHandle workspaceHandle = (IWorkspaceHandle)IWorkspace.ITEM_TYPE.createItemHandle(UUID.valueOf(uuid), null);
  
           IWorkspaceManager workspaceManager = SCMPlatform.getWorkspaceManager(repository);
           IWorkspaceConnection workspaceConnection = workspaceManager.getWorkspaceConnection(workspaceHandle,monitor);
  </code></pre>
  
  <p>Exception I get is the following:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.IllegalArgumentException: invalid
    UUID [Workspace=_iibA0GlNEeKd76sMjPDLRA]  at
    com.ibm.team.repository.common.UUID.valueOf(UUID.java:76)</p>
  </blockquote>
  
  <p>So am I walking on the right course or there are a better one you can guide me through!</p>