Exemple #1
0
        /// <summary>
        /// 该事件的处理函数
        /// </summary>
        protected override void __processing()
        {
            WE_STATUS status = WE_STATUS.SUSPEND;
            WorkFlows wfs    = new WorkFlows();

            try
            {
                switch ((string)m_run_params)
                {
                case "SUSPEND":
                    status = WE_STATUS.SUSPEND;
                    wfs.UpdateWorkFlowEntity(m_wfentityID, "WE_Status", status);
                    break;

                case "DELETE":
                    status = WE_STATUS.DELETED;
                    wfs.UpdateWorkFlowEntity(m_wfentityID, "WE_Status", status);
                    break;

                default:
                    break;
                }
                //调用用户定义的回调URL
                _CustomCallBack();
                this.status = TM_STATUS.TM_FINISH;
            }
            catch
            {
                Trace.WriteLine("Timeout processing exception!");
            }
        }
Exemple #2
0
        private static void UpdateEntity(CWorkFlow wf, WE_STATUS status)
        {
            try
            {
                WorkFlow_Entity wfe = new WorkFlow_Entity
                {
                    WE_Id     = wf.EntityID,
                    WE_Status = status
                };
                wfe.WE_Binary = Encoding.Default.GetBytes(wf.WriteToXmlNode().OuterXml);

                WorkFlows wfs = new WorkFlows();
                if (!wfs.SaveWorkFlowEntity(wfe))
                {
                    throw new Exception("Save WorkFlow Entity failed!");
                }
            }
            catch (Exception e)
            {
                return;
            }
        }
Exemple #3
0
        //更新工作流实体,(修改数据相应的项)
        public void UpdateEntity(WE_STATUS status)
        {
            try
            {
                WorkFlow_Entity wfe = new WorkFlow_Entity
                {
                    WE_Id = m_entityID,
                    WE_Status = status,
                    Last_Trans_Time = this.Last_TransTime
                };
                wfe.WE_Binary = Encoding.Default.GetBytes(WriteToXmlNode().OuterXml);

                WorkFlows wfs = new WorkFlows();
                if (!wfs.SaveWorkFlowEntity(wfe))
                    throw new Exception("Save WorkFlow Entity failed!");

            }
            catch(Exception e)
            {
                return;
            }
        }
Exemple #4
0
 /// <summary>
 /// 设置该任务的参数
 /// </summary>
 /// <param name="status">设置的工作流实体状态</param>
 public void SetRunParam(WE_STATUS status)
 {
     m_run_params = status;
 }