How to modify a deliverable?
![](http://jazz.net/_images/myphoto/75e72631bc504294362b9a05af5f8e36.jpg)
I want to modify a deliverable(Release) from the java API
I have the following but I'm getting an exception:
I have the following but I'm getting an exception:
IWorkItemCommon workItemService = (IWorkItemCommon) repository.getClientLibrary(IWorkItemCommon.class);
List<IDeliverable> releases = null;
releases = workItemService.findDeliverablesByProjectArea((IProjectArea) projectAreaWorkingCopy.getUnderlyingProcessItem().getWorkingCopy(),true,IDeliverable.DEFAULT_PROFILE,null);
for(IDeliverable release : releases){
if(release.getItemId().getUuidValue().equals(propagateId)){
release = workItemService.createDeliverable((IProjectArea) projectAreaWorkingCopy.getUnderlyingProcessItem().getWorkingCopy(), "New name", null);
//modify deliverable attributes here....
release = workItemService.saveDeliverable(release, null);
}
}
with this code I create another resource but, how could I modify an existent deliverable?