tsi.setTaskResult(runStatus.getTaskResult());
  private void startTask() {    if (m_TaskRunning == false && m_TaskQueue.size() > 0) {      Thread activeTaskThread;      activeTaskThread = new Thread() {	  public void run() {	    m_TaskRunning = true;	    Task currentTask = (Task)m_TaskQueue.pop();	    String taskId = (String)m_TaskIdQueue.pop();	    TaskStatusInfo tsi = (TaskStatusInfo)m_TaskStatus.get(taskId);	    tsi.setExecutionStatus(TaskStatusInfo.PROCESSING);	    tsi.setStatusMessage("RemoteEngine ("				 +m_HostName				 +") : task running...");	    try {	      System.err.println("Launching task id : "				 + taskId + "...");	      TaskStatusInfo runStatus = (TaskStatusInfo)currentTask.execute();	      tsi.setExecutionStatus(runStatus.getExecutionStatus());	      tsi.setStatusMessage("RemoteExperiment ("				   +m_HostName+") "				   +runStatus.getStatusMessage());	    } catch (Exception ex) {	      tsi.setExecutionStatus(TaskStatusInfo.FAILED);	      tsi.setStatusMessage("RemoteEngine ("				   +m_HostName				   +") : task failed.");	      System.err.println("Task id " + taskId + "Failed!");	    } finally {	      purgeClasses();	      m_TaskRunning = false;	      // start any waiting tasks	      startTask();	    }	  }	};      activeTaskThread.setPriority(Thread.MIN_PRIORITY);      activeTaskThread.start();    }  }