예제 #1
0
        /**********************************************************************************************
         * Mehtod   명 : AddWorkflowInitalInfo
         * 개   발  자 : 양영석
         * 생   성  일 : 2014-02-24
         * 용       도 : Workflow 관련 테이블에 기본 정보들을 등록한다.
         * Input    값 : AddWorkflowInitalInfo(Scheme Code, Scheme Sequence, TransitionStatus순번, 상세순번, 담당자순번, 담당자ID, 업무ID,
         *                                     상태코드(Y:승인, N:대기; X:거부), 패키지타입코드, 각패키지별ID, IWP ID)
         * Ouput    값 : SigmaResultType
         **********************************************************************************************/
        /// <summary>
        /// AddWorkflowInitalInfo : Workflow 관련 테이블에 기본 정보들을 등록한다.
        /// </summary>
        /// <param name="SchemeCode">Scheme Code</param>
        /// <param name="SchemeSeq">Scheme Sequence</param>
        /// <param name="TransitionStatusSeq">TransitionStatus순번</param>
        /// <param name="LoginIdRole">기안자RoleId</param>
        /// <param name="LoginID">기안자ID</param>
        /// <param name="TransitionLst">각단계별승인자정보</param>
        /// <param name="Title">기안제목</param>
        /// <param name="Context">기안내용</param>
        /// <param name="Comment">기안자코멘트</param>
        /// <param name="WorkflowTypeCode">Workflow타입코드</param>
        /// <param name="TargetId">각패키지별ID</param>
        /// <param name="IwpId">Iwp ID</param>
        /// <returns>Document용Guid</returns>
        public SigmaResultType AddWorkflowInitalInfo(string SchemeCode, int SchemeSeq, int TransitionStatusSeq, string LoginID, List<TypeTransition> TransitionLst, string Title, string Context, string Comment, string WorkflowTypeCode, int TargetId, int IwpId)
        {
            SigmaResultType result = new SigmaResultType();

            try
            {
                WorkflowMgr workflowMgr = new WorkflowMgr();

                // wfp_GetTransitionStatusSeq
                // wfp_GetProcessNameBySchemeCode
                // wfp_AddWorkflow
                // wfp_AddWorkflowProcess
                // wfp_AddWorkflowTransitionHistory
                workflowMgr.AddWorkflowInitalInfo(SchemeCode, SchemeSeq, TransitionStatusSeq, LoginID, TransitionLst, Title, Context, Comment, WorkflowTypeCode, TargetId, IwpId);
                result.AffectedRow = 1;
                result.IsSuccessful = true;
                return result;
            }
            catch (Exception ex)
            {
                // Log Exception
                ExceptionHelper.logException(ex);
                result.IsSuccessful = false;
                result.ErrorMessage = ex.Message;
                return result;
            }
        }