1 17 package org.apache.servicemix.beanflow; 18 19 import java.util.List ; 20 21 27 public class JoinAll extends JoinSupport { 28 29 private boolean failFast; 30 31 public JoinAll() { 32 super(); 33 } 34 35 public JoinAll(Activity... activities) { 36 super(activities); 37 } 38 39 public JoinAll(List <Activity> activities) { 40 super(activities); 41 } 42 43 public boolean isFailFast() { 44 return failFast; 45 } 46 47 53 public void setFailFast(boolean failFast) { 54 this.failFast = failFast; 55 } 56 57 61 protected void onChildStateChange(int childCount, int stoppedCount, int failedCount) { 62 if (failFast && failedCount > 0) { 64 fail("" + failedCount + " child workactivities have failed"); 65 } 66 if (childCount <= stoppedCount) { 67 if (failedCount > 0) { 68 fail("" + failedCount + " child workactivities have failed"); 69 } 70 else { 71 stop(); 72 } 73 } 74 } 75 76 } 77 | Popular Tags |