[Anthill-pro] Re: Adding environment on deployment workflows notifications and event selector doubt

emerson cargnin echofloripa.yell at gmail.com
Tue May 6 14:34:03 CDT 2008


For the first it doesn't show the environment, and for sure it is not
"Build-farm"

For the selector I get a null pointer from the EnvironmentLookup.

Any idea how to implement these two?

thanks
emerson

On 06/05/2008, emerson cargnin <echofloripa.yell at gmail.com> wrote:
> How can I show the environment in the notification when it's a
> deployment workflow (a secondary workflow)
>
> I added to the context script:
>
> // adding the environment
> context.put("environment", EnvironmentLookup.getCurrent().getName());
>
> and to template:
>
> <h1> Workflow: $workflow.Name
> </h1>
> <br/>
> #if ($environment !="Build-Farm")
> <h2> Environment: $environment
> </h2>
> #end
> <br/>
>
> Is this right?
>
> Second question:
>
> I have changed a event selector to send emails unless it's the
> continuous integration build (don't want people to get an email for
> each time the CI workflow deploys...)
>
> ----------------------------------------------------------------
> import com.urbancode.anthill3.domain.workflow.*;
>
> result = false;
> if (event instanceof WorkflowEvent &&
>    event.getCase().isComplete() &&
> !EnvironmentLookup.getCurrent().getName().equalsIgnoreCase("CI")) {
>  result = true;
> }
> return result;
> ----------------------------------------------------------------
>
> Is it right? It's not really working....
>


More information about the Anthill-pro mailing list