}
// --------------------------------------------- Running Jobs
public String submitJob(JobSubmission submission) throws Exception {
AsyncTask task = tasks.getAsyncTask(submission.getTaskId());
//NOTE: This is first so that we can easily throw UnknownTaskExceptions
String jobId = createJobId(); //TODO: synchronize and error check until jobs.put()?
AsyncTaskController controller = task.start(
submission.getInputs(),
submission.getEventHandler());
JobEntry jobEntry = new JobEntry(jobId, submission, controller);
jobs.put(jobId, jobEntry);