experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentId);
if (experiment == null) {
logger.error("Error retrieving the Experiment by the given experimentID: " + experimentId);
return false;
}
ExperimentStatus status = new ExperimentStatus();
status.setExperimentState(ExperimentState.LAUNCHED);
status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
experiment.setExperimentStatus(status);
registry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
registry.update(RegistryModelType.TASK_DETAIL, taskData, taskData.getTaskID());
//launching the experiment
orchestratorClient.launchTask(taskData.getTaskID(),airavataCredStoreToken);
}
}
} catch (Exception e) {
// Here we really do not have to do much because only potential failure can happen
// is in gfac, if there are errors in gfac, it will handle the experiment/task/job statuses
// We might get failures in registry access before submitting the jobs to gfac, in that case we
// leave the status of these as created.
ExperimentStatus status = new ExperimentStatus();
status.setExperimentState(ExperimentState.FAILED);
status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
experiment.setExperimentStatus(status);
try {
registry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
} catch (RegistryException e1) {
throw new TException(e);