Workflow wf = getWorkflow(); if(wf != null) { for (Enumeration tasks = wf.getTasks(); tasks.hasMoreElements(); ) { NewTask subtask = (NewTask) tasks.nextElement(); if(subtask.getWorkflow() != wf) { subtask.setWorkflow(wf); } } } super.postRehydration(logger); }
super.postRehydration(logger);  Workflow wf = getWorkflow(); if(wf != null) { for (Enumeration tasks = wf.getTasks(); tasks.hasMoreElements(); ) { NewTask subtask = (NewTask) tasks.nextElement(); Workflow owf = subtask.getWorkflow(); if (owf != wf) { subtask.setWorkflow(wf); if (owf != null) { logger.warn("Reset task's "+subtask+" workflow from "+owf+" to "+wf); } }  if (logger.isDebugEnabled()) { PlanElement subtaskPE = subtask.getPlanElement();  if (subtaskPE == null) { logger.debug("Subtask " + subtask.getUID() + " not disposed"); } else { logger.debug("Subtask " + subtask.getUID() + " disposed " + hc(subtaskPE)); } } } } }
   public void postRehydration(Logger logger) {      Workflow wf = getWorkflow();      if(wf != null) {	for (Enumeration tasks = wf.getTasks(); tasks.hasMoreElements(); ) {	  NewTask subtask = (NewTask) tasks.nextElement();	  if(subtask.getWorkflow() != wf) {	    subtask.setWorkflow(wf);	  }	}      }      super.postRehydration(logger);    }