Exemple #1
0
        public virtual IList <HistoricVariableInstanceDto> queryHistoricVariableInstances(HistoricVariableInstanceQueryDto queryDto, int?firstResult, int?maxResults, bool deserializeObjectValues)
        {
            queryDto.ObjectMapper = objectMapper;
            HistoricVariableInstanceQuery query = queryDto.toQuery(processEngine);

            query.disableBinaryFetching();

            if (!deserializeObjectValues)
            {
                query.disableCustomObjectDeserialization();
            }

            IList <HistoricVariableInstance> matchingHistoricVariableInstances;

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

            IList <HistoricVariableInstanceDto> historicVariableInstanceDtoResults = new List <HistoricVariableInstanceDto>();

            foreach (HistoricVariableInstance historicVariableInstance in matchingHistoricVariableInstances)
            {
                HistoricVariableInstanceDto resultHistoricVariableInstance = HistoricVariableInstanceDto.fromHistoricVariableInstance(historicVariableInstance);
                historicVariableInstanceDtoResults.Add(resultHistoricVariableInstance);
            }
            return(historicVariableInstanceDtoResults);
        }
Exemple #2
0
        public virtual CountResultDto queryHistoricVariableInstancesCount(HistoricVariableInstanceQueryDto queryDto)
        {
            queryDto.ObjectMapper = objectMapper;
            HistoricVariableInstanceQuery query = queryDto.toQuery(processEngine);

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

            result.Count = count;

            return(result);
        }