Ejemplo n.º 1
0
        public void ProcessActivityTest()
        {
            Thread.CurrentPrincipal = new PrincipalUserAdapter("ae");

            ProcessExecutionService processExecutionApplicationService = new ProcessExecutionService();

            try
            {
                var taskLists = processExecutionApplicationService.GetTaskList("ae");
                IList flows = null;
                foreach (IFlow task in taskLists)
                {
                    //跑完進入End State,因為
                    flows = processExecutionApplicationService.PerformActivity(task.Id);
                }

            }
            catch (ExecutionException e)
            {
                Assert.Fail("ExcecutionException while starting a new holiday request: " + e.Message);
            }
            finally
            {
                //      loginUtil.logout();
            }
        }
Ejemplo n.º 2
0
        public void ProcessActivityTest()
        {
            Thread.CurrentPrincipal = new PrincipalUserAdapter("ae");

            ProcessExecutionService processExecutionService = new ProcessExecutionService();

            try
            {
                //af申請的,ae是af的主管,登入者要換成ae
                var taskLists = processExecutionService.GetTaskList("ae");

                IDictionary attributeValues = new Hashtable();
                attributeValues.Add("evaluation result", Evaluation.APPROVE);

                foreach (IFlow task in taskLists)
                {
                    //出現一個無法處理的錯誤
                    processExecutionService.PerformActivity(task.Id, attributeValues);
                }
            }
            catch (ExecutionException e)
            {
                Assert.Fail("ExcecutionException while starting a new holiday request: " + e.Message);
            }
            finally
            {
                //      loginUtil.logout();
            }
        }