Version Differences for Event Triggers

Line 31:
       
  return bl;</pre>    return bl;</pre> 
       
    + = Run Non-Originating Workflow On Latest BuildLife If Haven't Already =  
       
    + This script applies to build lives created by the "Run" workflow of the project.  
    + ==== AHPSCRIPTS-44 ====  
    + <pre>import com.urbancode.anthill3.domain.workflow.*;  
    + buildLife = BuildLifeLookup.mostRecentSuccessForProjectAndWorkflowName(project, "Run");  
    + if (buildLife != null) {  
    + workflows = WorkflowCaseFactory.getInstance().restoreArrayForBuildLife(buildLife);  
    + for (int w=0; w<workflows.length; w++) {  
    + if (workflow.equals(workflows[w].getWorkflow())) {  
    + System.out.println("Workflow found, not running secondary workflow");  
    + buildLife = null;  
    + break;  
    + }  
    + }  
    + }  
    + return buildLife;</pre>  
       
    + In 3.5 and later you can use:  
    + <pre>buildLife = BuildLifeLookup.mostRecentSuccessForProjectAndWorkflowName(project, "Run");  
    + if (buildLife != null) {  
    + if (BuildLifeLookup.hasExecutedSecondaryWorkflow(buildLife, workflow)) {  
    + buildLife = null;  
    + }  
    + }  
    + return buildLife;</pre>