throw new TransitionException( "Failed to run RoutingDef " + rd.getId(), e);
throw new RunRoutingException( "Failed to run RoutingDef " + rd, e);
	private List runRouting(ITaskDefinition taskDef, ITaskInstance taskInstance)			throws TransitionException {		Set routingDefs = taskDef.getRoutingOut();		boolean doneSerialRouting = false;		List createList = new ArrayList();		for (Iterator it = routingDefs.iterator(); it.hasNext();) {			IRoutingDefinition rd = (IRoutingDefinition) it.next();			boolean doRouting = false;			boolean addTask = false;			/*			 * Need to process conditional routing seperately to parallel			 * routing as their behaviours are different.			 * 			 * If we've already had a serial routing whose condition passed, we			 * dont want to run another.			 * 			 * All parallel routings are run, even if we've had one that has			 * already passed it's condition.			 *  			 */			if (!rd.getParallel() && !doneSerialRouting) {				doRouting = true;			} else if (rd.getParallel()) {				// always do all parallel routings				doRouting = true;			}			if (doRouting) {				// do this routing				String className = rd.getConditionClass();				if (className != null) {					IConditionAction ica;					try {						// instance the condition class						ica = classFactory.getConditionAction(className);						addTask = ica.runCondition(rd, taskInstance);					} catch (Exception e) {						throw new TransitionException(								"Failed to run RoutingDef " + rd.getId(), e);					}				} else {					// class not specified, so we assume "true"					addTask = true;				}			}			if (addTask) {				createList.add(rd);				if (!rd.getParallel()) {					/*					 * routing is serial, so make a note of this so we dont run					 * any more serial routings					 */					doneSerialRouting = true;				}			}		}		return createList;	}