Welcome to the Jazz Community Forum
How do I set the state of a build result created with "BuildItemFactory.createBuildResult()"?

Accepted answer

Comments

Thanks Spencer, I'm looking into this possibility now.

Any chance you can provide an example? I'm not seeing how to move through the process for a build result created using BuildItemFactory. Thanks in advance.

Take a look at
ITeamBuildRequestClient.startBuild(IBuildRequestHandle, String[], IProgressMonitor)
ITeamBuildRequestClient.makeBuildComplete(IBuildResultHandle, boolean,
String[], IProgressMonitor)
For marking a build as abandoned
ITeamBuildRequestClient.makeBuildIncomplete(IBuildResultHandle, String[],
IProgressMonitor)
The ITeamBuildRequestClient can be obtained from ClientFactory

To mark a build result as 'Complete', I first had to claim it. Thanks Heather!
buildRequestClient.claimRequest(IBuildRequestHandle buildRequestHandle, IBuildEngineHandle buildEngineHandle, java.lang.String[] properties, org.eclipse.core.runtime.IProgressMonitor progressMonitor);
One other answer

I have very limited experience with the build api. I did a little poking around, and it looks like if you use createBuildResult() instead of createBuildResultContribution(), you can call result.setStatus(). I'm not sure if that will work for your situation, but I thought I'd pass that along in case it helps.