bool IWFStepRules.BuildAndValidateBusinessData(out string strMsg)
    {
        //这里是验证组件和业务数据的地方
        strMsg = "";
        TMisMonitorTaskVo objTask       = new TMisMonitorTaskLogic().Details(this.TASK_ID.Value);
        string            strAcceptance = new TSysDictLogic().GetDictNameByDictCodeAndType("acceptance_code", "dict_system_base");//默认的固定验收监测类别

        if (objTask.CONTRACT_TYPE == strAcceptance)
        {
            wfControl.SetMoreDealUserFlag = true;//自定义任务接收人

            if (!string.IsNullOrEmpty(this.PROJECT_ID.Value))
            {
                wfControl.MoreDealUserForAdd(this.PROJECT_ID.Value);
                return(true);
            }
            else
            {
                strMsg = "该项目无项目负责人,请联系管理员!";
                return(false);
            }
        }
        // 环境质量类别特殊处理 直接完成流程
        if (ValidateEnvMonitor(this.TASK_ID.Value))
        {
            //更改监测任务状态
            objTask.TASK_STATUS = "12";
            objTask.FINISH_DATE = DateTime.Now.ToString();
            if (new TMisMonitorTaskLogic().Edit(objTask))
            {
                WriteLog("完成监测任务", "", LogInfo.UserInfo.ID + "完成监测任务" + objTask.ID);
            }
            //销毁的处理方法
            //调用页面基类的处理方法即可
            string strWfInstID = new i3.BusinessLogic.Sys.WF.TWfInstControlLogic().Details(new TWfInstControlVo()
            {
                WF_SERVICE_CODE = objTask.CONTRACT_CODE,
                WF_SERVICE_NAME = objTask.PROJECT_NAME
            }).ID;
            if (new PageBaseForWF().WFOperateForKillBySSZ(strWfInstID))//终止整个任务流程
            {
                LigerDialogAlert("任务已结束!", "success");
            }
            //Response.Redirect(ViewState["BeforePageUrl"].ToString());
            return(true);
        }
        return(true);
    }
        /// <summary>
        /// 创建实例流程(包括未处理的第一个环节)数据接口
        /// </summary>
        /// <param name="strWFID">流程代码</param>
        /// <param name="strObjectUser">目标处理人用户ID</param>
        /// <param name="strCreateUser">生成人员ID</param>
        /// <param name="strServiceCode">业务类型编码</param>
        /// <param name="strServiceName">业务类型名称</param>
        /// <returns></returns>
        public bool CreateInstWFAndFirstStep(string strWFID, string strObjectUser, string strCreateUser, string strServiceCode, string strServiceName)
        {
            TWfInstTaskDetailVo detail  = new TWfInstTaskDetailVo();
            TWfInstControlVo    control = new TWfInstControlVo();
            TWfSettingTaskVo    task    = new TWfSettingTaskLogic().GetFirstStep(strWFID);
            TWfSettingFlowVo    flow    = new TWfSettingFlowLogic().Details(new TWfSettingFlowVo()
            {
                WF_ID = strWFID
            });

            //如果不存在数据,则返回
            if (string.IsNullOrEmpty(task.ID) || string.IsNullOrEmpty(flow.ID))
            {
                return(false);
            }

            detail.ID                  = GetGUID();
            detail.INST_NOTE           = task.TASK_NOTE;
            detail.INST_TASK_CAPTION   = task.TASK_CAPTION;
            detail.INST_TASK_STARTTIME = GetDateTimeToStanString();
            detail.INST_TASK_STATE     = TWfCommDict.StepState.StateNormal;
            detail.OBJECT_USER         = strObjectUser;
            detail.SRC_USER            = strCreateUser;
            detail.WF_ID               = strWFID;
            detail.WF_INST_ID          = GetGUID();
            detail.WF_SERIAL_NO        = GetDateTimeToStringFor15();
            detail.WF_TASK_ID          = task.WF_TASK_ID;

            control.ID              = detail.WF_INST_ID;
            control.IS_SUB_FLOW     = "0";
            control.WF_CAPTION      = flow.WF_CAPTION;
            control.WF_ID           = strWFID;
            control.WF_INST_TASK_ID = detail.ID;
            control.WF_NOTE         = flow.WF_NOTE;
            control.WF_PRIORITY     = TWfCommDict.WfPriority.Priority_1;
            control.WF_SERIAL_NO    = detail.WF_SERIAL_NO;
            control.WF_SERVICE_CODE = strServiceCode;
            control.WF_SERVICE_NAME = strServiceName;
            control.WF_STARTTIME    = detail.INST_TASK_STARTTIME;
            control.WF_STATE        = TWfCommDict.WfState.StateNormal;
            control.WF_TASK_ID      = detail.WF_TASK_ID;

            bool bIsDetail  = this.Create(detail);
            bool bIsControl = new TWfInstControlLogic().Create(control);

            return(bIsDetail & bIsControl);
        }