public boolean checkParameter(IMessage message, String processid) { con = (Connection) message.getOtherParameter("con"); Str_name = message.getUserParameterValue("Str_name"); Str_code = message.getUserParameterValue("Str_code"); Int_instructStateID = message.getUserParameterValue("Int_instructStateID"); Int_planIncorporate = message.getUserParameterValue("Int_planIncorporate"); Int_instCount = message.getUserParameterValue("Int_instCount"); int_materielruleid = message.getUserParameterValue("int_materielruleid"); // 输出log信息 String debug = "状态名:Int_instructStateID:" + Int_instructStateID + " Int_planIncorporate:" + Int_planIncorporate + " Int_instCount:" + Int_instCount + "\n"; log.info("添加状态转换的参数: " + debug); if (Str_name == null) { message.addServiceException( new ServiceException( ServiceExceptionType.PARAMETERLOST, "输入参数为空", this.getId(), processid, new java.util.Date(), null)); return false; } return true; }
@Override public boolean checkParameter(IMessage message, String processid) { con = (Connection) message.getOtherParameter("con"); int_produnitid = message.getUserParameterValue("int_produnitid"); int_exceptioncause = message.getUserParameterValue("int_exceptioncause"); str_description = message.getUserParameterValue("str_description"); int_device = message.getUserParameterValue("int_device") == null ? "" : message.getUserParameterValue("int_device"); devicetype = message.getUserParameterValue("devicetype") == null ? "" : message.getUserParameterValue("devicetype"); userid = message.getUserParameterValue("userid"); int_exceptiontype = message.getUserParameterValue("int_exceptiontype"); int_device = int_device == null ? "" : int_device; devicetype = devicetype == null ? "" : devicetype; // 输出log信息 String debug = " 生产单元 :" + int_produnitid + ";" + "描述:" + str_description + ";" + "设备号:" + int_device; log.debug("添加异常记录用户提交的参数: " + debug); if (int_produnitid == null || str_description == null || int_exceptioncause == null) { message.addServiceException( new ServiceException( ServiceExceptionType.PARAMETERLOST, "输入参数为空", this.getId(), processid, new java.util.Date(), null)); log.fatal("生产单元、描述、异常原因中有为空参数,退出服务。"); return false; } return true; }
private boolean initFordo(IMessage message, String soa_processid) { // 数据库连接 con = null; // 流程号 processid = null; // 输入端服务别名 i_serveralias = null; // 输入端的参数名 i_parameter = null; // 数据来源 source = null; // 输出端的服务别名 o_serveralias = null; // 输出端的参数名 o_parameter = null; // 获取该服务的输入参数的值 con = (Connection) message.getOtherParameter("con"); processid = message.getUserParameterValue("processid"); i_serveralias = message.getUserParameterValue("i_serveralias"); i_parameter = message.getUserParameterValue("i_parameter"); source = message.getUserParameterValue("source"); o_serveralias = message.getUserParameterValue("o_serveralias"); o_parameter = message.getUserParameterValue("o_parameter"); // 获取运行流程项 IProcess process = ProcessFactory.getInstance(soa_processid); String processInfo = process.getNameSpace() + "." + process.getName(); String debug_Service_UpdateAdapter = "流程号: processid = " + processid + "\n\r" + "输入端服务别名: i_serveralias = " + i_serveralias + "\n\r" + "输入端的参数名: i_parameter = " + i_parameter + "\n\r" + "数据来源: source = " + source + "\n\r" + "输出端的服务别名: o_serveralias = " + o_serveralias + "\n\r" + "输出端的参数名: o_parameter = " + o_parameter + "\n\r" + "数据库连接: con = " + con + "\n\r"; log.debug(processInfo + ",修改适配器: " + debug_Service_UpdateAdapter + "\n"); if (processid == null || i_serveralias == null || i_parameter == null || source == null || o_serveralias == null || o_parameter == null) { message.addServiceException( new ServiceException( ServiceExceptionType.PARAMETERLOST, "缺少输入参数", this.getId(), soa_processid, new java.util.Date(), null)); log.error(processInfo + ",修改适配器操作中,缺少输入参数" + "\n"); return false; } return true; }
private boolean initFordo(IMessage message, String soa_processid) { con = null; usrno = null; usrname = null; password = null; roleno = null; employeeid = null; state = null; lastupdateuser = null; lastupdatetime = null; note = null; enabled = null; oldRoleno = null; con = (Connection) message.getOtherParameter("con"); usrno = message.getUserParameterValue("usrno"); usrname = message.getUserParameterValue("usrname"); password = message.getUserParameterValue("password"); roleno = message.getUserParameterValue("roleno").trim(); oldRoleno = message.getUserParameterValue("oldRoleno").trim(); default_roleno = message.getUserParameterValue("default_roleno"); old_default_roleno = message.getUserParameterValue("old_default_roleno"); employeeid = message.getUserParameterValue("employeeid"); state = message.getUserParameterValue("state"); lastupdateuser = message.getUserParameterValue("lastupdateuser"); lastupdatetime = message.getUserParameterValue("lastupdatetime"); note = message.getUserParameterValue("note"); enabled = message.getUserParameterValue("enabled"); // 获取运行流程项 IProcess process = ProcessFactory.getInstance(soa_processid); String processInfo = process.getNameSpace() + "." + process.getName(); String debug_UpdateUser = "******" + usrno + "\n" + "usrname = " + usrname + "\n" + "password = "******"\n" + "roleno = " + roleno + "\n" + "oldRoleno = " + oldRoleno + "\n" + "default_roleno = " + default_roleno + "\n" + "old_default_roleno = " + old_default_roleno + "\n" + "employeeid = " + employeeid + "\n" + "state = " + state + "\n\r" + "lastupdateuser = "******"\n" + "lastupdatetime = " + lastupdatetime + "\n" + "note = " + note + "\n" + "enabled = " + enabled + "\n"; log.debug(processInfo + ",修改用户时用户提交的参数: " + debug_UpdateUser); if (usrno == null || usrname == null || password == null || roleno == null || employeeid == null || state == null || lastupdateuser == null || lastupdatetime == null || note == null || enabled == null) { message.addServiceException( new ServiceException( ServiceExceptionType.PARAMETERLOST, "添加用户时参数为空", this.getId(), soa_processid, new java.util.Date(), null)); log.error(processInfo + ",修改用户,缺少输入参数"); return false; } return true; }