}
}
public void updateExperimentStatus(String experimentId, ExperimentState state) throws Exception {
logger.info("Updating the experiment status of experiment: " + experimentId + " to " + state.toString());
Experiment details = (Experiment)airavataRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
if(details == null) {
details = new Experiment();
details.setExperimentID(experimentId);
}
org.apache.airavata.model.workspace.experiment.ExperimentStatus status = new org.apache.airavata.model.workspace.experiment.ExperimentStatus();
status.setExperimentState(state);
status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
details.setExperimentStatus(status);
airavataRegistry.update(RegistryModelType.EXPERIMENT, details, experimentId);
}