Beispiel #1
0
        /// <summary>
        /// 发起流程
        /// </summary>
        /// <param name="action"></param>
        /// <param name="flowName"></param>
        /// <returns></returns>
        public bool StartProcess(ProcessAction action, string flowName, string requestor, ref int ProcInstID)
        {
            if (SaveData(action))
            {
                ProcControl.GetDataFields();
                string approveXml = ProcControl.GetApproveXml();
                string fullName   = flowName;

                ProcInstID = -1;//added by lee

                //取得审批链Xml
                WS.K2.K2WS ws  = new WS.K2.K2WS();
                string     pid = ws.StartProcess(fullName, requestor, FormID, approveXml, string.Empty, string.Empty);
                if (StringHelper.isNumeric(pid))
                {
                    ProcInstID = Int32.Parse(pid);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
        public static bool ApproveProcess(string sn, string action, string currentUser, string activityXML)
        {
            WS.K2.K2WS ws  = new WS.K2.K2WS();
            string     ret = ws.ExecuteProcess(sn, action, currentUser, activityXML);

            if (ret == "Success")
            {
                return(true);
            }
            return(false);
        }
Beispiel #3
0
 public static string StartProcessWithWS(string procName, string user, string folio, string processApproveChain, string infoSource, string key)
 {
     WS.K2.K2WS ws = new WS.K2.K2WS();
     return(ws.StartProcess(procName, user, folio, processApproveChain, infoSource, key));
 }