Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Setting the Build Label in Operation Participant (server)

Hi team,

I'm trying to set the label of a build in an operation participant but I can't it.
I don't understand how to make the change from "IItemsResponse" to "IBuildResult"

In a snippet, it is easy:

https://jazz.net/wiki/bin/view/Main/BuildJavaProgrammingExamples

ITeamBuildClient buildClient = (ITeamBuildClient) teamRepository.getClientLibrary(ITeamBuildClient.class);
IBuildDefinition buildDefinition = buildClient.getBuildDefinition(buildDefinitionId, monitor);

ITeamBuildRequestClient requestClient = (ITeamBuildRequestClient) teamRepository.getClientLibrary(ITeamBuildRequestClient.class);
IBuildRequest buildRequest = requestClient.requestBuild(buildDefinition, true, monitor);

String[] properties = new String[] { IBuildResult.PROPERTY_LABEL };

IBuildResult buildResult = (IBuildResult) teamRepository.itemManager().fetchPartialItem(
buildRequest.getBuildResult(), IItemManager.REFRESH, Arrays.asList(properties), monitor);

String label = "Set Build Label Snippet build";
buildResult = (IBuildResult) buildResult.getWorkingCopy();
buildResult.setLabel(label);

buildClient.save(buildResult, monitor);


But in an operation participant:

......

IItemsResponse itemsresponse = buildRequestService.requestBuild((IBuildDefinitionHandle)buildService.getBuildDefinition(buildDefinition).getItemHandle(), buildProperties, null, true, false);

IItemsResponse --> IBuildResult ?????

Could you help me?
Any help would be appreciated

Thanks in advance!!!

Best regards,
Javier Lisbona

0 votes


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Sep 20 '11, 10:43 a.m.

Question was seen: 6,736 times

Last updated: Sep 20 '11, 10:43 a.m.

Confirmation Cancel Confirm