示例#1
0
        /// <summary>
        /// 发起流程(POC)
        /// </summary>
        /// <param name="action"></param>
        /// <param name="flowName"></param>
        /// <returns></returns>
        public bool StartProcess(ProcessAction action, string flowName, ref int ProcInstID)
        {
            if (SaveData(action))
            {
                string fullName = flowName;

                ProcInstID = -1;             //added by lee

                ProcControl.GetDataFields(); //取得datafields
                ProcControl.GetXmlFields();  //取得xmlfields

                if (WorkflowHelper.StartProcess(fullName, FormID, DataFields, XmlFields, ref ProcInstID))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
示例#2
0
        /// <summary>
        /// start process
        /// </summary>
        /// <param name="action">process action</param>
        /// <returns></returns>
        public bool StartProcess(ProcessAction action)
        {
            if (SaveData(action))
            {
                ProcControl.GetDataFields();
                string fullName = "SohuBPMFlow\\OAF"; //SqlHelper.ExecuteScalar(Database.MerckHRWorkFlow, "GetWorkflowFullName", new SqlParameter[] { new SqlParameter("@intWorkflowID", WorkflowID) }).ToString();

                int ProcInstID = -1;                  //added by lee

                //if (WorkflowHelper.StartProcess(MUID, Password, fullName, ClaimID, DataFields))//FBA to AD
                //if (WorkflowHelper.StartProcess(fullName, ClaimID, DataFields))
                if (WorkflowHelper.StartProcess(fullName, FormID, DataFields, ref ProcInstID))
                {
                    //流程启动成功,得到K2返回的 ProcessInstance ID,通过FormID来更改这个表单的ProcessID
                    UpdateProcInstID(ProcInstID, FormID);//edit by lee 2011-5-31
                    return(ProcessLog(ProcessAction.Submit.ToString()));
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
示例#3
0
        public bool StartProcess(ProcessAction action, string flowName)
        {
            if (SaveData(action))
            {
                ProcControl.GetDataFields();
                string fullName = "";
                if (WorkflowID == 3)
                {
                    fullName = flowName;
                }
                else
                {
                    fullName = "SohuBPMFlow\\TAF";
                }//SqlHelper.ExecuteScalar(Database.MerckHRWorkFlow, "GetWorkflowFullName", new SqlParameter[] { new SqlParameter("@intWorkflowID", WorkflowID) }).ToString();

                int ProcInstID = -1;//added by lee


                if (WorkflowHelper.StartProcess(fullName, FormID, DataFields, ref ProcInstID))
                {
                    //流程启动成功,得到K2返回的 ProcessInstance ID,通过FormID来更改这个表单的ProcessID
                    if (WorkflowID != 3)
                    {
                        return(UpdateProcInstID(ProcInstID, FormID, "TAF"));//edit by lee 2011-5-31
                    }
                    else
                    {
                        return(true);//edit by lee
                    }
                    // return ProcessLog(ProcessAction.Submit.ToString());
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }