It's all about the answers!

Ask a question

How to retrieve attribute "Build Engine" from IBuildResult object


Lee John (5119) | asked Mar 23 '15, 8:41 p.m.
 As title, I have use RTC plain java client libraries to query the RTC system and retrieve the desired IBuildResult object. Then next step is that I want to retrieve the attribute "Build Engine" from it:

Above is a snapshot from my RTC system. For this example, I want to grab the "raphael" information.

Many thanks!

Accepted answer


permanent link
Krishna Kishore (50112) | answered Mar 30 '15, 12:03 a.m.
JAZZ DEVELOPER
 Hi,

Build engine information can be obtained via the build request, following is the pseudo code 
//get the item service to get the details
IRepositoryItemService itemService = << get the IRepositoryItemService.class >>
//get the build request handle
IBuildRequestHandle requestHandle = (IBuildRequestHandle) buildresult.getBuildRequests().get(0); 
//get the build request details
IBuildRequest request = (IBuildRequest) itemService.fetchItem(requestHandle, IBuildRequest.PROPERTIES_COMPLETE); 
//get the build engine for the build request
IBuildEngineHandle  buildEngineHandler = request.getHandler(); 

Thanks,

Kishore


Lee John selected this answer as the correct answer

Comments
Lee John commented Mar 30 '15, 3:38 a.m.

 I post the whole same code which I prove it will work in below link:


Anyone who have same problem can be benefit. 

Thanks to Kishore!

Your answer


Register or to post your answer.