# Uses of Interface
org.flowable.engine.history.HistoricProcessInstanceQuery

Packages that use HistoricProcessInstanceQuery
Package
Description
org.flowable.engine
Public API of the Flowable engine.
Typical usage of the API starts by the creation of a `ProcessEngineConfiguration` (typically based on a configuration file), from which a `ProcessEngine` can be obtained.
Through the services obtained from such a `ProcessEngine`, BPM and workflow operation can be executed:
`RepositoryService`: Manages `Deployment`s.
`RuntimeService`: For starting and searching `ProcessInstance`s.
`TaskService`: Exposes operations to manage human (standalone) tasks, such as claiming, completing and assigning tasks.
`IdentityService`: Used for managing users, groups and the relations between them.
`ManagementService`: Exposes engine administration and maintenance operations, which have no relation to the runtime exection of business processes.
`HistoryService`: Exposes information about ongoing and past process instances.
`FormService`: Access to form data and rendered forms for starting new process instances and completing tasks.
org.flowable.engine.history
Classes related to the `HistoryService`.
org.flowable.engine.interceptor

- ## Uses of HistoricProcessInstanceQuery in org.flowable.engine

  Methods in org.flowable.engine that return HistoricProcessInstanceQuery
  Modifier and Type
  Method
  Description
  `HistoricProcessInstanceQuery`
  DefaultHistoryCleaningManager.`createHistoricProcessInstanceCleaningQuery()`
  `HistoricProcessInstanceQuery`
  HistoryCleaningManager.`createHistoricProcessInstanceCleaningQuery()`
  `HistoricProcessInstanceQuery`
  HistoryService.`createHistoricProcessInstanceQuery()`
  Creates a new programmatic query to search for `HistoricProcessInstance`s.

- ## Uses of HistoricProcessInstanceQuery in org.flowable.engine.history

  Methods in org.flowable.engine.history that return HistoricProcessInstanceQuery
  Modifier and Type
  Method
  Description
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`activeActivityId(String activityId)`
  Select the historic process instances which have an active activity instance like the provided id.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`activeActivityIds(Set<String> activityIds)`
  Select the historic process instances which have an active activity instance like the provided ids.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`deleted()`
  Only select historic process instances that are deleted.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`deploymentId(String deploymentId)`
  Only select historic process instances that are defined by a process definition with the given deployment identifier.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`deploymentIdIn(List<String> deploymentIds)`
  Only select historic process instances that are defined by a process definition with one of the given deployment identifiers.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`endOr()`
  End an OR statement.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`excludeProcessDefinitionKeys(List<String> processDefinitionKeys)`
  Only select historic process instances that are defined by a process definition that doesn't match one of the given process definition keys.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`excludeSubprocesses(boolean excludeSubprocesses)`
  Exclude sub processes from the query result;
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`finished()`
  Only select historic process instances that are completely finished.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`finishedAfter(Date date)`
  Only select historic process instances that were finished after the given date.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`finishedBefore(Date date)`
  Only select historic process instances that were finished before the given date.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`includeProcessVariables()`
  Include process variables in the process query result
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`includeProcessVariables(Collection<String> variableNames)`
  Include the process variables with the given names into the query result.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`involvedGroup(String groupId, String identityLinkType)`
  Only select the historic process instances with which the group with the given id and link type is involved.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`involvedGroups(Set<String> groups)`
  Only select the historic process instances with which the group with the given ids are involved.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`involvedUser(String userId)`
  Only select the historic process instances with which the user with the given id is involved.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`involvedUser(String userId, String identityLinkType)`
  Only select the historic process instances with which the user with the given id and link type is involved.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`locale(String locale)`
  Localize historic process name and description to specified locale.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableExists(String name)`
  Only select process instances which have a local variable with the given name.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableNotExists(String name)`
  Only select process instances which does not have a local variable with the given name.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueEquals(Object value)`
  Only select process instances which had at least one local variable with the given value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueEquals(String name, Object value)`
  Only select process instances which had a local variable with the given value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueEqualsIgnoreCase(String name, String value)`
  Only select historic process instances which have a local string variable with the given value, case insensitive.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueGreaterThan(String name, Object value)`
  Only select process instances which had a local variable value greater than the passed value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueGreaterThanOrEqual(String name, Object value)`
  Only select process instances which had a local variable value greater than or equal to the passed value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueLessThan(String name, Object value)`
  Only select process instances which had a local variable value less than the passed value when the ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueLessThanOrEqual(String name, Object value)`
  Only select process instances which has a local variable value less than or equal to the passed value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueLike(String name, String value)`
  Only select process instances which had a local variable value like the given value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueLikeIgnoreCase(String name, String value)`
  Only select process instances which had a local variable value like (case insensitive) the given value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueNotEquals(String name, Object value)`
  Only select process instances which had a local variable with the given name, but with a different value than the passed value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`localVariableValueNotEqualsIgnoreCase(String name, String value)`
  Only select historic process instances which have a local string variable not matching the given value, case insensitive.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`notDeleted()`
  Only select historic process instance that are not deleted.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`or()`
  Begin an OR statement.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`orderByProcessDefinitionId()`
  Order by the process definition id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`orderByProcessInstanceBusinessKey()`
  Order by the business key (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`orderByProcessInstanceDuration()`
  Order by the duration of the process instance (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`orderByProcessInstanceEndTime()`
  Order by the end time (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`orderByProcessInstanceId()`
  Order by the process instance id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`orderByProcessInstanceStartTime()`
  Order by the start time (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`orderByTenantId()`
  Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`parentCaseInstanceId(String parentCaseInstanceId)`
  Only select process instances with the given parent case instance id.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionCategory(String processDefinitionCategory)`
  Only select historic process instances whose process definition category is processDefinitionCategory.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionCategoryLike(String processDefinitionCategoryLike)`
  Only select historic process instances whose process definition category is like the given value.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionCategoryLikeIgnoreCase(String processDefinitionCategoryLikeIgnoreCase)`
  Only select historic process instances whose process definition category is like the given value, ignoring upper/lower case.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionId(String processDefinitionId)`
  Only select historic process instances for the given process definition
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionKey(String processDefinitionKey)`
  Only select historic process instances that are defined by a process definition with the given key.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionKeyIn(List<String> processDefinitionKeys)`
  Only select historic process instances that are defined by a process definition with one of the given process definition keys.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionKeyLike(String processDefinitionKeyLike)`
  Select historic process instances whose process definition key is like the given value
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionKeyLikeIgnoreCase(String processDefinitionKeyLikeIgnoreCase)`
  Select historic process instances whose process definition key is like the given value, ignoring upper/lower case.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionKeyNotIn(List<String> processDefinitionKeys)`
  Only select historic process instances that don't have a process-definition of which the key is present in the given list
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionName(String processDefinitionName)`
  Select process historic instances whose process definition name is processDefinitionName
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionNameLike(String processDefinitionNameLike)`
  Select process historic instances whose process definition name is like the given value
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionNameLikeIgnoreCase(String processDefinitionNameLikeIgnoreCase)`
  Select process historic instances whose process definition name is like the given value, ignoring upper/lower case
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processDefinitionVersion(Integer processDefinitionVersion)`
  Only select historic process instances with a certain process definition version.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceBusinessKey(String processInstanceBusinessKey)`
  Only select historic process instances with the given business key
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceBusinessKeyLike(String businessKeyLike)`
  Only select historic process instances with a business key like the given value.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceBusinessKeyLikeIgnoreCase(String businessKeyLikeIgnoreCase)`
  Only select historic process instances with a business key like the given value, ignoring upper/lower case.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceBusinessStatus(String businessStatus)`
  Only select historic process instances with the given business status
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceBusinessStatusLike(String businessStatusLike)`
  Only select historic process instances with a business status like the given value.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceBusinessStatusLikeIgnoreCase(String businessStatusLikeIgnoreCase)`
  Only select historic process instances with a business status like the given value, ignoring upper/lower case.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceCallbackId(String callbackId)`
  Only select process instances with the given callback identifier.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceCallbackType(String callbackType)`
  Only select process instances with the given callback type.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceId(String processInstanceId)`
  Only select historic process instances with the given process instance.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceIds(Set<String> processInstanceIds)`
  Only select historic process instances whose id is in the given set of ids.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceName(String name)`
  Only select process instances with the given name.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceNameLike(String nameLike)`
  Only select process instances with a name like the given value.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceNameLikeIgnoreCase(String nameLikeIgnoreCase)`
  Only select process instances with a name like the given value, ignoring upper/lower case.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceParentScopeId(String parentScopeId)`
  Only select historic process instances with the given parent process instance id.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceReferenceId(String referenceId)`
  Only select process instances with the given reference identifier.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceReferenceType(String referenceType)`
  Only select process instances with the given reference type.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceRootScopeId(String rootScopeId)`
  Only select historic process instances with a root instance with a name like the given value.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceTenantId(String tenantId)`
  Only select process instances that have the given tenant id.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceTenantIdLike(String tenantIdLike)`
  Only select process instances with a tenant id like the given one.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase)`
  Only select process instances with a tenant id like the given one, ignoring upper/lower case.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`processInstanceWithoutTenantId()`
  Only select process instances that do not have a tenant id.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`returnIdsOnly()`
  Return only the id value of the process instances, to reduce any additional instance data to be returned.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`startedAfter(Date date)`
  Only select historic process instances that were started after the given date.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`startedBefore(Date date)`
  Only select historic process instances that were started before the given date.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`startedBy(String userId)`
  Only select historic process instance that are started by the given user.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`superProcessInstanceId(String superProcessInstanceId)`
  Only select historic process instances started by the given process instance.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`unfinished()`
  Only select historic process instance that are not yet finished.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableExists(String name)`
  Only select process instances which have a global variable with the given name.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableNotExists(String name)`
  Only select process instances which does not have a global variable with the given name.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueEquals(Object value)`
  Only select process instances which had at least one global variable with the given value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueEquals(String name, Object value)`
  Only select process instances which had a global variable with the given value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueEqualsIgnoreCase(String name, String value)`
  Only select historic process instances which have a global string variable with the given value, case insensitive.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueGreaterThan(String name, Object value)`
  Only select process instances which had a global variable value greater than the passed value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueGreaterThanOrEqual(String name, Object value)`
  Only select process instances which had a global variable value greater than or equal to the passed value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueLessThan(String name, Object value)`
  Only select process instances which had a global variable value less than the passed value when the ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueLessThanOrEqual(String name, Object value)`
  Only select process instances which has a global variable value less than or equal to the passed value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueLike(String name, String value)`
  Only select process instances which had a global variable value like the given value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueLikeIgnoreCase(String name, String value)`
  Only select process instances which had a global variable value like (case insensitive) the given value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueNotEquals(String name, Object value)`
  Only select process instances which had a global variable with the given name, but with a different value than the passed value when they ended.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`variableValueNotEqualsIgnoreCase(String name, String value)`
  Only select historic process instances which have a global string variable not matching the given value, case insensitive.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`withJobException()`
  Only select process instances that failed due to an exception happening during a job execution.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`withLocalizationFallback()`
  Instruct localization to fallback to more general locales including the default locale of the JVM if the specified locale is not found.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`withoutProcessInstanceCallbackId()`
  Only select process instances that do not have a callback identifier.
  `HistoricProcessInstanceQuery`
  HistoricProcessInstanceQuery.`withoutSorting()`
  Perform the query without applying sorting parameters.

- ## Uses of HistoricProcessInstanceQuery in org.flowable.engine.interceptor

  Methods in org.flowable.engine.interceptor with parameters of type HistoricProcessInstanceQuery
  Modifier and Type
  Method
  Description
  `void`
  HistoricProcessInstanceQueryInterceptor.`afterHistoricProcessInstanceQueryExecute(HistoricProcessInstanceQuery processInstanceQuery, List<HistoricProcessInstance> processInstances)`
  `void`
  HistoricProcessInstanceQueryInterceptor.`beforeHistoricProcessInstanceQueryExecute(HistoricProcessInstanceQuery processInstanceQuery)`