Version Differences for Event Selector

(AHPSCRIPTS-11)
(AHPSCRIPTS-19)
Line 87:
       
  return result;</pre>    return result;</pre> 
       
    + = Notify Based on Environment in Which a Workflow Ran =  
    + * This script is intended to be an Event Selector script and should be used as part of a Notification Scheme. It determines when people should be notified. If the a workflow runs in a specific environment (the script as posted, checks for "QA") then it will return true. Using this script, you can choose to notify a group of users when deployments happen to specific environments.  
    + ==== AHPSCRIPTS-115 ====  
    + <pre>import com.urbancode.anthill3.domain.workflow.*;  
    + import com.urbancode.anthill3.domain.buildlife.*;  
    + import com.urbancode.anthill3.domain.servergroup.*;  
       
    + result = false;  
       
    + if(event instanceof WorkflowEvent){  
    + if(event.getCase().isComplete()) {  
       
    + ServerGroup sg = event.getCase().getServerGroup();  
       
    + if("QA".equals(sg.getName())){  
    + result = true;  
    + }//end if  
    + }//end if  
    + }//end if  
       
    + return result;</pre>