Version Differences for Pre-Condition: Step

(Step Pre-Condition That Works Based on a Workflow Name)
(AHPSCRIPTS-65)
Line 34:
  Property.is("buildType", "official")     Property.is("buildType", "official")  
  );</pre>    );</pre> 
       
    + = Run if Triggered by Particular Schedule =  
       
    + * This script will allow a step to run if it was triggered by a specific schedule Change the name of "Nightly 1am (expression)" to be your schedule name.  
       
    + ==== AHPSCRIPTS-94 ====  
    + <pre>import com.urbancode.anthill3.domain.buildrequest.BuildRequest;  
    + import com.urbancode.anthill3.domain.buildrequest.*;  
    + BuildRequest request = BuildRequestLookup.getCurrent();  
    + String scheduleName = null;  
    + return new Criteria() {  
    + public boolean matches(Object obj) {  
    + if (RequestSourceEnum.SCHEDULED.equals(request.getRequestSource())) {  
    + scheduleName = request.getRequester().getSchedule().getName();  
    + }  
    + return "Nightly 1am (expression)".equals(scheduleName);  
    + }  
    + }</pre>