/** * Create a new experiment from the values submitted in the form * @return null */ public static function create_experiment() { $experiment = ExperimentUtilities::assemble_experiment(); $expId = null; try { if ($experiment) { $expId = Airavata::createExperiment(Session::get('authz-token'), Session::get("gateway_id"), $experiment); } if ($expId) { /* CommonUtilities::print_success_message("Experiment {$_POST['experiment-name']} created!" . ' <a href="experiment_summary.php?expId=' . $expId . '">Go to experiment summary page</a>'); */ } else { CommonUtilities::print_error_message("Error creating experiment {$_POST['experiment-name']}!"); } } catch (InvalidRequestException $ire) { CommonUtilities::print_error_message('InvalidRequestException!<br><br>' . $ire->getMessage()); } catch (AiravataClientException $ace) { CommonUtilities::print_error_message('AiravataClientException!<br><br>' . $ace->getMessage()); } catch (AiravataSystemException $ase) { CommonUtilities::print_error_message('AiravataSystemException!<br><br>' . $ase->getMessage()); } return $expId; }