done = true; if ((thisAction.getActionEvaluation().getAction().getTechSpec().getActionType() == ActionTechSpecInterface.CORRECTIVE_ACTIONTYPE) || (outOfResources()) || (index == knob.getMaxActions())) done = true; } else done = true;
Action a = thisAction.getActionEvaluation().getAction(); ActionTechSpecInterface ats = actionTechSpecService.getActionTechSpec(a.getClass().getName()); if (ats == null) { if (logger.isErrorEnabled()) logger.error("Cannot find ActionTechSpec for "+a.getClass().getName()); } if (outOfResources() || (index >= knob.getMaxActions())) { done = true; } else if (ats != null &&  ats.getActionType() == ActionTechSpecInterface.CORRECTIVE_ACTIONTYPE) { done = true; } else { done = false; } } else {  done = true; }
  private void selectActions(CostBenefitEvaluation cbe, ActionSelectionKnob knob) {    boolean done = false;    int index = 0;    while (!done) {        SelectedAction thisAction = selectBest(cbe, knob);         if (logger.isDebugEnabled()) 	    logger.debug("SelectAction: thisAction="+((thisAction != null)?thisAction.toString():null));        if (thisAction != null) {            publishAdd(thisAction);            index++;            done = true; // done because can't find anything useful to do            if ((thisAction.getActionEvaluation().getAction().getTechSpec().getActionType() == ActionTechSpecInterface.CORRECTIVE_ACTIONTYPE) // Because we try only one corrective action at a time		|| (outOfResources())		|| (index == knob.getMaxActions()))		done = true;         } else done = true;    }  }