public boolean isExperimentExists(String experimentId, boolean createIfNotPresent)throws RegistryException {
if (jpa.getWorker().isExperimentExists(experimentId)){
return true;
}else if (createIfNotPresent){
if (!isWorkspaceProjectExists(DEFAULT_PROJECT_NAME, true)){
throw new WorkspaceProjectDoesNotExistsException(createProjName(DEFAULT_PROJECT_NAME));
}
AiravataExperiment experiment = new AiravataExperiment();
experiment.setExperimentId(experimentId);
experiment.setSubmittedDate(Calendar.getInstance().getTime());
experiment.setGateway(getGateway());