コード例 #1
0
ファイル: WorkflowService.cs プロジェクト: zitjubiz/Slickflow
        /// <summary>
        /// 获取转移实例记录
        /// </summary>
        /// <param name="query">查询实体</param>
        /// <returns>转移列表</returns>
        public IList <TransitionImage> GetTransitionInstanceList(TransitionInstanceQuery query)
        {
            IList <TransitionImage> imageList = new List <TransitionImage>();
            var tm   = new TransitionInstanceManager();
            var list = tm.GetTransitionInstanceList(query.AppInstanceID, query.ProcessGUID).ToList();

            foreach (TransitionInstanceEntity t in list)
            {
                imageList.Add(new TransitionImage
                {
                    ID             = t.ID,
                    TransitionGUID = t.TransitionGUID
                });
            }

            return(imageList);
        }
コード例 #2
0
        public ResponseResult <List <TransitionImage> > QueryCompletedTransitionInstance(TransitionInstanceQuery query)
        {
            var result = ResponseResult <List <TransitionImage> > .Default();

            try
            {
                var wfService = new WorkflowService();
                var itemList  = wfService.GetTransitionInstanceList(query).ToList();

                result = ResponseResult <List <TransitionImage> > .Success(itemList);
            }
            catch (System.Exception ex)
            {
                result = ResponseResult <List <TransitionImage> > .Error(string.Format(
                                                                             "获取已完成转移数据失败, 异常信息:{0}",
                                                                             ex.Message));
            }
            return(result);
        }
コード例 #3
0
        public ResponseResult <List <TransitionImage> > QueryCompletedTransitionInstance([FromBody] TransitionInstanceQuery query)
        {
            var result = ResponseResult <List <TransitionImage> > .Default();

            try
            {
                var wfService = new WorkflowService();
                var itemList  = wfService.GetTransitionInstanceList(query).ToList();

                result = ResponseResult <List <TransitionImage> > .Success(itemList);
            }
            catch (System.Exception ex)
            {
                result = ResponseResult <List <TransitionImage> > .Error(LocalizeHelper.GetDesignerMessage("wf2xmlcontroller.querycompletedtransitioninstance.error", ex.Message));
            }
            return(result);
        }