if ( distributedBuildManager.isAgentAvailable( buildAgentUrl ) )
{
SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
String releaseId =
client.releasePrepare( createProjectMap( project ), createPropertiesMap( releaseProperties ),
releaseVersion, developmentVersion, environments, username );
addReleasePrepare( releaseId, buildAgentUrl, releaseVersion.get( releaseId ), "prepare" );
addReleaseInProgress( releaseId, "prepare", project.getId(), username );