* @param version
* @return
*/
public String verifyAppVersion(String appId, String version) {
AppService appService = (AppService)AppUtil.getApplicationContext().getBean("appService");
AppDefinitionDao appDefinitionDao = (AppDefinitionDao)AppUtil.getApplicationContext().getBean("appDefinitionDao");
AppDefinition appDef = appService.getAppDefinition(appId, version);
if (appDef != null) {
return null;
}
// get latest version
Long latestVersion = appDefinitionDao.getLatestVersion(appId);
if (latestVersion != null && latestVersion != 0) {
return "redirect:/web/console/app/" + appId + "/processes";
} else {
// no version found, redirect to home page
return "redirect:/web/console/home";