Beispiel #1
0
        public virtual IList <HistoricTaskInstanceDto> queryHistoricTaskInstances(HistoricTaskInstanceQueryDto queryDto, int?firstResult, int?maxResults)
        {
            queryDto.ObjectMapper = objectMapper;
            HistoricTaskInstanceQuery query = queryDto.toQuery(processEngine);

            IList <HistoricTaskInstance> match;

            if (firstResult != null || maxResults != null)
            {
                match = executePaginatedQuery(query, firstResult, maxResults);
            }
            else
            {
                match = query.list();
            }

            IList <HistoricTaskInstanceDto> result = new List <HistoricTaskInstanceDto>();

            foreach (HistoricTaskInstance taskInstance in match)
            {
                HistoricTaskInstanceDto taskInstanceDto = HistoricTaskInstanceDto.fromHistoricTaskInstance(taskInstance);
                result.Add(taskInstanceDto);
            }
            return(result);
        }
Beispiel #2
0
        public virtual CountResultDto queryHistoricTaskInstancesCount(HistoricTaskInstanceQueryDto queryDto)
        {
            queryDto.ObjectMapper = objectMapper;
            HistoricTaskInstanceQuery query = queryDto.toQuery(processEngine);

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

            result.Count = count;

            return(result);
        }
Beispiel #3
0
        public virtual CountResultDto getHistoricTaskInstancesCount(UriInfo uriInfo)
        {
            HistoricTaskInstanceQueryDto queryDto = new HistoricTaskInstanceQueryDto(objectMapper, uriInfo.QueryParameters);

            return(queryHistoricTaskInstancesCount(queryDto));
        }
Beispiel #4
0
        public virtual IList <HistoricTaskInstanceDto> getHistoricTaskInstances(UriInfo uriInfo, int?firstResult, int?maxResults)
        {
            HistoricTaskInstanceQueryDto queryDto = new HistoricTaskInstanceQueryDto(objectMapper, uriInfo.QueryParameters);

            return(queryHistoricTaskInstances(queryDto, firstResult, maxResults));
        }