Exemplo n.º 1
0
        public virtual CountResultDto queryTasksCount(TaskQueryDto queryDto)
        {
            ProcessEngine engine = ProcessEngine;

            queryDto.ObjectMapper = ObjectMapper;
            TaskQuery query = queryDto.toQuery(engine);

            long           count  = query.count();
            CountResultDto result = new CountResultDto();

            result.Count = count;

            return(result);
        }
Exemplo n.º 2
0
        public virtual HalTaskList getHalTasks(UriInfo uriInfo, int?firstResult, int?maxResults)
        {
            TaskQueryDto queryDto = new TaskQueryDto(ObjectMapper, uriInfo.QueryParameters);

            ProcessEngine engine = ProcessEngine;
            TaskQuery     query  = queryDto.toQuery(engine);

            // get list of tasks
            IList <Task> matchingTasks = executeTaskQuery(firstResult, maxResults, query);

            // get total count
            long count = query.count();

            return(HalTaskList.generate(matchingTasks, count, engine));
        }
Exemplo n.º 3
0
        public virtual IList <TaskDto> queryTasks(TaskQueryDto queryDto, int?firstResult, int?maxResults)
        {
            ProcessEngine engine = ProcessEngine;

            queryDto.ObjectMapper = ObjectMapper;
            TaskQuery query = queryDto.toQuery(engine);

            IList <Task> matchingTasks = executeTaskQuery(firstResult, maxResults, query);

            IList <TaskDto> tasks = new List <TaskDto>();

            foreach (Task task in matchingTasks)
            {
                TaskDto returnTask = TaskDto.fromEntity(task);
                tasks.Add(returnTask);
            }

            return(tasks);
        }