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

emerson cargnin echofloripa.yell at gmail.com
Wed May 7 04:51:21 CDT 2008


hello? someone there?

On 06/05/2008, emerson cargnin <echofloripa.yell at gmail.com> wrote:
> Got the log from velocity template, it also gets a null object:
>
> 2008-05-06 20:29:18,034 ERROR JobThread-4472
> com.urbancode.anthill3.services.template.TemplateApplication - Left
> side ($environment) of '!=' operation has null value. Operation not
> possible. null [line 68, column 21]
>
> any help is very appreciated.
> thanks
> emerson
>
> On 06/05/2008, emerson cargnin <echofloripa.yell at gmail.com> wrote:
> > 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