/** * Begin节点 * * @param mainVo * @param userInfo * @param params_dc * @throws Exception */ public int flowBegin() { String taskUserLoginName = LoginUtil.getUserLoginName(userInfo); Map<String, Object> map = new HashMap<String, Object>(); String sign_leader = StringUtil.getNotNullValueString( params.getParamObject(DeptContactConstants.PARAMS_KEY_SIGN_LEADER)); String ip = IpUtil.getIpByStartString(DeptContactConstants.IP_PREFIX); String port = StringUtil.getNotNullValueString(params.getParamObject(DeptContactConstants.IP_PORT)); String contextPath = StringUtil.getNotNullValueString( params.getParamObject(DeptContactConstants.IP_CONTEXT_PATH)); map.put(DeptContactFlowConstants.SERVERIP, "http://" + ip + ":" + port + "/" + contextPath); map.put(DeptContactFlowConstants.USER_BEGIN, taskUserLoginName); map.put(DeptContactFlowConstants.USER_APPLY, taskUserLoginName); map.put(DeptContactFlowConstants.USER_SIGN, sign_leader); map.put(DeptContactFlowConstants.DEPTID, userInfo.getDeptId()); map.put(DeptContactFlowConstants.TARGET, DeptContactFlowConstants.STEP_SIGN); map.put("短信内容", mainBo.getTheme()); // log.debug("发起流程开始"); map.put(DeptContactFlowConstants.LINK_PROCESS_KEY, params.treeBo.getId()); int incidentNo = this.launchProcess(mainBo.getProcessname(), taskUserLoginName, mainBo.getTheme(), map); log.debug("发起流程结束,incidentNo=" + incidentNo); return incidentNo; }
/** * 申请节点 * * @param mainVo * @param userInfo * @param params_dc * @throws Exception */ public boolean flowApply() { // UserVo userVo = params.userVo; String processName = StringUtil.getNotNullValueString(mainBo.getProcessname()); String incidentNo = StringUtil.getNotNullValueString(mainBo.getIncidentno()); // String summary = StringUtil.getNotNullValueString(mainBo.getTheme()); String summary = FlowUtil.getSummaryByProcessInfo(processName, incidentNo); Map<String, Object> map = new HashMap<String, Object>(); String taskUserLoginName = LoginUtil.getUserLoginName(userInfo); /** Ultimus签发节点信息 */ String sign_leader = StringUtil.getNotNullValueString( params.getParamObject(DeptContactConstants.PARAMS_KEY_SIGN_LEADER)); // log.debug(params.getParamObject(DeptcontactConstants.PARAMS_KEY_SIGN_LEADER)); // log.debug("param.size()="+params.param.size()); // log.debug("sign_leader:"+sign_leader); map.put(DeptContactFlowConstants.USER_SIGN, sign_leader); /** 签发 */ if (DeptContactConstants.CHOICE_APPLY_TO_SIGN.equals(operateVo.getChoice())) { map.put(DeptContactFlowConstants.TARGET, DeptContactFlowConstants.STEPNAME_SIGN); } /** 取消 */ if (DeptContactConstants.CHOICE_APPLY_TO_CANCEL.equals(operateVo.getChoice())) { map.put(DeptContactFlowConstants.TARGET, DeptContactFlowConstants.STEPNAME_END); } /**/ boolean flag = PWSUtil.completeStepTest( processName, taskUserLoginName, Integer.parseInt(incidentNo), operateVo.getSteplabel(), summary, "", map); return flag; // return false; }