[Anthill-pro] Adding environment on deployment workflows
notifications and event selector doubt
emerson cargnin
echofloripa.yell at gmail.com
Tue May 6 14:13:20 CDT 2008
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