public void save() throws RegistryException{
EntityManager em = null;
try {
em = ResourceUtils.getEntityManager();
ExperimentConfigData existingConfig = em.find(ExperimentConfigData.class, experimentResource.getExpID());
em.close();
em = ResourceUtils.getEntityManager();
em.getTransaction().begin();
ExperimentConfigData configData = new ExperimentConfigData();
Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
configData.setExpId(experimentResource.getExpID());
configData.setExperiment(experiment);
configData.setAiravataAutoSchedule(airavataAutoSchedule);
configData.setOverrideManualParams(overrideManualParams);
configData.setShareExp(shareExp);
if (existingConfig != null) {
existingConfig.setExpId(experimentResource.getExpID());
existingConfig.setExperiment(experiment);
existingConfig.setAiravataAutoSchedule(airavataAutoSchedule);
existingConfig.setOverrideManualParams(overrideManualParams);