// obtain tasks
Task t = jip.obtainNewTask(this.stus, groomNum);
// assembly into actions
// List<Task> tasks = new ArrayList<Task>();
if (jip.getStatus().getRunState() == JobStatus.RUNNING) {
WorkerProtocol worker = groomServerManager.findGroomServer(this.stus);
try {
// dispatch() to the groom server
Directive d1 = new DispatchTasksDirective(groomServerManager
.currentGroomServerPeers(), new GroomServerAction[] {
new LaunchTaskAction(t)});
worker.dispatch(d1);
} catch (IOException ioe) {
LOG.error("Fail to dispatch tasks to GroomServer "
+ this.stus.getGroomName(), ioe);
}
} else {