Beispiel #1
0
        /// <summary>
        /// Get Next Tasks For User
        /// </summary>
        /// <param name="request">Request</param>
        /// <returns>GetNextTasksForUserResponse</returns>
        public GetNextTasksForUserResponse GetNextTasksForUser(GetNextTasksForUserRequest request)
        {
            var response = new GetNextTasksForUserResponse();

            response.Tasks = _task.GetNextTasksForUser(request.User, request.WorkflowOid, request.Domain, request.PageIndex, request.PageSize, request.SearchFor).ToArray();

            return(response);
        }
Beispiel #2
0
        private static GetNextTasksForUserResponse GetTasks(string workflowId)
        {
            var getNextTasksForUserRequest = new GetNextTasksForUserRequest
            {
                User        = "******",
                WorkflowOid = Guid.Parse(workflowId)
            };

            GetNextTasksForUserResponse tasks = null;

            using (var src = new FlowTasksService("FlowTasksService_Endpoint"))
            {
                tasks = src.GetNextTasksForUser(getNextTasksForUserRequest);
            }

            return(tasks);
        }
Beispiel #3
0
        /* GetTasksList
         * TODO: To improve performance we should get the tasks to display
         * from ther server without  getting all the records all the time.
         */

        /// <summary>
        /// Get Tasks List
        /// </summary>
        /// <param name="filterModel">FilterModel</param>
        /// <returns>TaskListModel</returns>
        private TaskListModel GetTasksList(FilterModel filterModel)
        {
            var getNextTasksForUserRequest = new GetNextTasksForUserRequest
            {
                User        = HttpContext.User.Identity.Name,
                WorkflowOid = Guid.Empty,
                Domain      = filterModel.Domain == Domains.All ? string.Empty : filterModel.Domain,
            };

            GetNextTasksForUserResponse tasks = TasksService.GetNextTasksForUser(getNextTasksForUserRequest);

            var filter      = new TaskFilter(filterModel);
            var trimedTasks = filter.RunSearch(tasks.Tasks);

            var taskList = CreateTaskList(filter, trimedTasks);

            return(new TaskListModel {
                Tasks = taskList
            });
        }
Beispiel #4
0
 /// <summary>
 /// Get Next Tasks For User
 /// </summary>
 /// <param name="request">Request</param>
 /// <returns>GetNextTasksForUserResponse</returns>
 public GetNextTasksForUserResponse GetNextTasksForUser(GetNextTasksForUserRequest request)
 {
     return(Channel.GetNextTasksForUser(request));
 }