[RTC] Creation of RTC Release Programmatically
![](http://jazz.net/_images/myphoto/48ec91c4f8003efbae12810e8a116267.jpg)
Accepted answer
![](http://jazz.net/_images/myphoto/48ec91c4f8003efbae12810e8a116267.jpg)
A release in the context of RTC is an com.ibm.team.workitem.common.model.IDeliverable and can be created using com.ibm.team.workitem.common.IWorkItemCommon.createDeliverable(IProjectAreaHandle, String, IProgressMonitor). The interface IDeliverable has, amongst others, a method to set an iteration.
One other answer
![](http://jazz.net/_images/myphoto/48ec91c4f8003efbae12810e8a116267.jpg)
IDeliverable release = (IDeliverable) IDeliverable.ITEM_TYPE.createItem();
release.setArchived(false);
release.setName(releaseName);
release.setFiltered(false);
release.setArtifact(newIteration.getItemHandle());
release.setIteration((IIterationHandle) newIteration.getItemHandle());
fWorkItemCommon = (IWorkItemCommon) fTeamRepository.getClientLibrary(IWorkItemCommon.class);
fWorkItemClient.saveDeliverable(release, null);
This code is getting failed.
Comments
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
Several issues:
- "This code is getting failed." is not an error description that makes me willing to spend another second on the code. It is totally unprofessional. I am not free services and can decide where I help on the forum. I am not going to rebuild your code to see the error message.
- That If answers are given the answers are not thoroughly read is discouraging to answer questions. I shared the method to create a deliverable already and it is not the one you use.
- I am pretty sure I have mentioned this to you already: set up a development workspace with the SDK following the RTC Extensions Workshop and use the find and navigation capabilities of Eclipse to search the SDK for the usage of the API. That way you can figure out how the API works as soon as you have an idea which class you need to deal with e.g. IDeliverable. This is how I find the answers and is the best way I know to approach the Java APIs.
![](http://jazz.net/_images/myphoto/48ec91c4f8003efbae12810e8a116267.jpg)
Sorry for my behaviour for not providing error logs. I will try to analyse bit more.
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
Try using the proposed method to create the deliverable.