@Override
public void updateExperiment(String airavataExperimentId, Experiment experiment) throws InvalidRequestException, ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException {
try {
registry = RegistryFactory.getDefaultRegistry();
if (!registry.isExist(RegistryModelType.EXPERIMENT, airavataExperimentId)){
throw new ExperimentNotFoundException("Requested experiment id " + airavataExperimentId + " does not exist in the system..");
}
ExperimentStatus experimentStatus = getExperimentStatus(airavataExperimentId);
if (experimentStatus != null){
ExperimentState experimentState = experimentStatus.getExperimentState();
switch (experimentState){