}
return ret;
}
public String commandUploadWfXMLConfigFile(){
ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
ExpTypeExecutablePP eTypeExecPP = (ExpTypeExecutablePP)ExpTypeBackingBean.getExpTypeBean(AdminManagerImpl.EXECUTABLEPP);
eTypeExecPP.reInitBeanForWFXMLConfigUploaded();
//0) upload the specified WFconfig to the user's personal repository for storing it
log.info("commandUploadWfXMLConfigFile: uploading an xml configuration for a WEE WF.");
FileUploadBean uploadBean = UploadManager.uploadFile(true);
if( uploadBean == null ) {
log.warn("commandUploadWfXMLConfigFile: Uploaded file was null.");
NewExpWizardController.redirectToExpStage(expBean.getID(), 2);
return "success";
}
String fileRef = uploadBean.getUniqueFileName();
log.debug("Uploaded file: uniqueFileName: "+fileRef);
eTypeExecPP.setXMLConfigFileProvided(true);
//1) Check the configuration and parse the WorkflowConfig object
try {
eTypeExecPP.checkAndParseWorkflowConfigObject(fileRef);
} catch (Exception e) {
saveExpTypeBeanAndRedirectToExpStage(expBean.getID(), 2, eTypeExecPP);
return "success";
}
//2) check if the workflow is available on the WEE Template registry
String wfClass = eTypeExecPP.getWeeXMLConfig().getTemplate().getClazz();
WftRegistryService wftRegistryService = WeeRemoteUtil.getInstance().getWeeRegistryService();
if (wftRegistryService.getAllSupportedQNames().contains(wfClass)){
eTypeExecPP.setTemplateAvailableInWftRegistry(true);
}else{
eTypeExecPP.setTemplateAvailableInWftRegistry(false);
saveExpTypeBeanAndRedirectToExpStage(expBean.getID(), 2, eTypeExecPP);
return "success";
}
//3) populate the bean with servic specific information
eTypeExecPP.populateServiceInformationFromWorkflowConfig();
//reload stage2 and display the further navigation options
log.info("commandUploadWfXMLConfigFile DONE");
saveExpTypeBeanAndRedirectToExpStage(expBean.getID(), 2, eTypeExecPP);
return "success";
}