[Anthill-pro] RE: Propagating properties to dependencies

Alexandre Borgia alexandre.borgia at ubisoft.com
Mon Jul 28 09:36:08 CDT 2008


Here is our script, it's actually quite similar to what is done in Henning's one:

import com.urbancode.anthill3.domain.buildlife.*;
import com.urbancode.codestation2.domain.buildlife.*;
import com.urbancode.anthill3.domain.buildrequest.*;
import com.urbancode.anthill3.domain.project.*;

setProperty( BuildRequest request, String propName ) {
  if ( request.getProperty(propName) != null ) {
	PropertyLookup.set( propName, request.getProperty(propName) );
  }
}

BuildLife currentLife = BuildLifeLookup.getCurrent();
CodestationCompatableBuildLife[] lives = currentLife.getDependencyBuildLifeArray();

for ( int i = 0; i < lives.length; i++ ) {
	BuildLife life = (BuildLife) lives[i];
	BuildRequest request = life.getOriginatingWorkflow().getRequest();
	setProperty( request, "SomePropertyName" );
	// ...
}


We call "setProperty" many times for all the property names we want to propagate.

Hope this helps!

	- Alexandre Borgia


-----Message d'origine-----
De : anthill-pro-bounces at lists.urbancode.com [mailto:anthill-pro-bounces at lists.urbancode.com] De la part de emerson cargnin
Envoyé : 27 juillet 2008 14:17
À : AnthillPro user and support list.
Objet : Re: [Anthill-pro] RE: Propagating properties to dependencies

Hi Alexandre

Can you share your script?

Thanks
emerson

On 27/07/2008, Alexandre Borgia <alexandre.borgia at ubisoft.com> wrote:
> We have to do something similar here as well, but instead of putting the script in the Agent Filter it is an "eval script" step that is performed when needed in the first job of the workflow.  This may be a way to leave the Agent Filter script alone.
>
> I agree it would be nice to have a built-in feature that takes care of this.
>
>  - Alexandre Borgia
>


More information about the Anthill-pro mailing list