FacesContext facesContext = FacesContext.getCurrentInstance();
if (facesContext != null) {
Application application = facesContext.getApplication();
ExperimentBean bean = ((ExperimentBean) application.createValueBinding("#{experiment}").getValue(facesContext));
try {
Experiment bean2 = new Experiment();
this.setExperimentID(bean.getExpName() + UUID.randomUUID());
bean2.setId(getExperimentID());
bean2.setName(bean.getExpName());
bean2.setDescription(bean.getDescription());
super.getContext().getExpBuilderManager().createExperiment(
bean.getProjectName(), bean2, workflow);
this.setWorkflowID(workflow.getName() + UUID.randomUUID());
workflow.getWorkflow().setExperimentId(getExperimentID());
workflow.getWorkflow().setWorkflowInstanceId(new URI(getWorkflowID()));