Spring = ModelAndView public String subForm(Model model,ServletRequest request){ request.getParameter("xxxx"); }
Struts = ActionMapping public ActionForward login(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { request.getParameter("xxxx"); }
流程图
/** * 显示流程图页面。 * * @param mapping * @param form * @param request * @param response * @return * @author: 710000571 * @version: 1.0 * * Modification History: * Date Author Description * ----------------------- * May 30, 2009 710000571 Initialization */ public ActionForward viewProcessMap(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { String processInstanceId = request .getParameter(DicConstant.REQ_KEY_PROCESS_INSTANCE_ID); String processDefinitionName = null; String processStatus = null; //先通过Process Instance Id取得流程名称及当前状态。 if(StringUtils.isNotEmpty(processInstanceId)){ RequestBean reqBean = (RequestBean)DTOUtils.getReqBeanByReqMap( new RequestBean(), request.getParameterMap()); ResponseBean resBean = BeanLocatorUtil.getLocalWfServiceManager().getProcessInfoByProcessInstance(reqBean); reqBean = WFBeanUtils.getReqBeanFromRes(reqBean, resBean); processDefinitionName = reqBean.getProcessDefinitionName(); processStatus = WFBeanUtils.getProcessStatus(resBean); if (log.isDebugEnabled()) { log.debug("process Instance Id [" + processInstanceId + "] Name[" + processDefinitionName + "]"); } } //如果从工作流中心取得流程名称失败,则从Request中取得流程名称。 if(StringUtils.isEmpty(processDefinitionName)){ processDefinitionName = request.getParameter(DicConstant.REQ_KEY_PROCESS_DEFINITION_NAME); if (log.isDebugEnabled()) { log.debug("process Instance Name[" + processDefinitionName + "]"); } } //如果从工作流中心取得流程当前状态失败,则从Request中取得流程当前状态。 if(StringUtils.isEmpty(processStatus)){ processStatus = request.getParameter(DicConstant.REQ_KEY_PROCESS_STATUS); } //如果从工作流和Request中取得都失败,则使用流程名称作为流程作为流程当前状态。即:没有任何状态。 if(StringUtils.isEmpty(processStatus)){ processStatus = processDefinitionName; } if (log.isDebugEnabled()) { log.debug("process Status[" + processStatus + "]"); } // if(DicConstant.PROCESS_STATUS_END.equalsIgnoreCase(processStatus)){ // processStatus = processDefinitionName; // } Assert.notNull(processDefinitionName, "Get process definition name failure."); Assert.notNull(processStatus, "Get process status failure."); request.setAttribute(DicConstant.REQ_KEY_PROCESS_DEFINITION_NAME, processDefinitionName); request.setAttribute(DicConstant.REQ_KEY_PROCESS_STATUS, processStatus); return mapping.findForward(VIEW); }
时间: 2024-10-14 07:02:34