public static void Wf_createFstNode(String params, HttpServletRequest request) throws Exception { String[] p = params.split("\\;"); String userid = p[0]; String progid = p[1]; String dicttblid = p[2]; String seq = p[3]; String mdltypno = p[4]; String org_no = p[5]; Database db = null; Rowset rs = null; String sql = null; try { sql = "select WFAPP_ID from WFMDLTYPMST where MDLTYP_NO = " + mdltypno; rs = WorkFlowExecSql.wf_getRs(sql); String appid = ""; if (rs.next()) { appid = rs.getString(1); } WorkflowUtil.creatFstNode( dicttblid, progid, appid, seq, mdltypno, userid, "0", "2", null, "", org_no); } catch (Exception se) { se.printStackTrace(); } finally { if (db != null) { db.cleanup(); } } }
public static void Wf_createFstNodeS(String params, HttpServletRequest request) throws Exception { String[] p = params.split("\\;"); String userid = p[0]; String progid = p[1]; String dicttblid = p[2]; String seq = p[3]; String mdltypno = p[4]; String org_no = p[5]; Database db = null; Rowset rs = null; Rowset rsin = null; Rowset obrs = null; Rowset currrs = null; String sql = null; String startobj = null; StringBuffer rtn = new StringBuffer(); sql = "SELECT user_id FROM WFSTRIGMST WHERE MDLTYP_NO='" + mdltypno + "' and USER_FLG='1'"; try { rs = WorkFlowExecSql.wf_getRs(sql); int i = 0; while (rs.next()) { if (i < rs.getRowCount()) { rtn.append(rs.getString(1) + ";"); } else { rtn.append(rs.getString(1)); } i++; } String version = WorkFlowUtilExt.getWorkFlowCurrVerison(mdltypno); sql = "select object_no from wfobjmst t where t.model_no='" + version + "' and t.object_typ='01'"; obrs = WorkFlowExecSql.wf_getRs(sql); if (obrs.next()) { startobj = obrs.getString(1); } sql = "select object_no from vw_wfobjrelmst where head='" + startobj + "'"; currrs = WorkFlowExecSql.wf_getRs(sql); if (currrs.next()) { rtn = new StringBuffer(currrs.getString(1) + "|").append(rtn); } sql = "select WFAPP_ID from WFMDLTYPMST where MDLTYP_NO = " + mdltypno; rsin = WorkFlowExecSql.wf_getRs(sql); String appid = ""; if (rs.next()) { appid = rsin.getString(1); } WorkflowUtil.creatFstNode( dicttblid, progid, appid, seq, mdltypno, userid, "0", "1", rtn.toString(), "", org_no); } catch (Exception se) { se.printStackTrace(); } finally { if (db != null) { db.cleanup(); } } }