Package org.flowable.engine.history

# Interface HistoricProcessInstanceQuery

All Superinterfaces:
  `BatchDeleteQuery<HistoricProcessInstanceQuery>`, `DeleteQuery<HistoricProcessInstanceQuery,HistoricProcessInstance>`, `Query<HistoricProcessInstanceQuery,HistoricProcessInstance>`

public interface HistoricProcessInstanceQuery extends Query<HistoricProcessInstanceQuery,HistoricProcessInstance>, DeleteQuery<HistoricProcessInstanceQuery,HistoricProcessInstance>, BatchDeleteQuery<HistoricProcessInstanceQuery>
Allows programmatic querying of `HistoricProcessInstance`s.

Author:
  Tom Baeyens, Joram Barrez, Tijs Rademakers, Falko Menge

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.flowable.common.engine.api.query.Query

  `Query.NullHandlingOnOrder`

- ## Method Summary

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

  ### Methods inherited from interface org.flowable.common.engine.api.query.BatchDeleteQuery

  `deleteInParallelUsingBatch, deleteSequentiallyUsingBatch`

  ### Methods inherited from interface org.flowable.common.engine.api.query.DeleteQuery

  `delete, deleteWithRelatedData`

  ### Methods inherited from interface org.flowable.common.engine.api.query.Query

  `asc, count, desc, list, listPage, orderBy, orderBy, singleResult`

- ## Method Details

  - ### processInstanceId

    HistoricProcessInstanceQuery processInstanceId(String processInstanceId)
    Only select historic process instances with the given process instance. `ProcessInstance` ids and `HistoricProcessInstance` ids match.

  - ### processInstanceIds

    HistoricProcessInstanceQuery processInstanceIds(Set<String> processInstanceIds)
    Only select historic process instances whose id is in the given set of ids. `ProcessInstance` ids and `HistoricProcessInstance` ids match.

  - ### processDefinitionId

    HistoricProcessInstanceQuery processDefinitionId(String processDefinitionId)
    Only select historic process instances for the given process definition

  - ### processDefinitionKey

    HistoricProcessInstanceQuery processDefinitionKey(String processDefinitionKey)
    Only select historic process instances that are defined by a process definition with the given key.

  - ### processDefinitionKeyIn

    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.

  - ### excludeProcessDefinitionKeys

    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.

  - ### processDefinitionKeyNotIn

    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

  - ### processDefinitionKeyLike

    HistoricProcessInstanceQuery processDefinitionKeyLike(String processDefinitionKeyLike)
    Select historic process instances whose process definition key is like the given value

  - ### processDefinitionKeyLikeIgnoreCase

    HistoricProcessInstanceQuery processDefinitionKeyLikeIgnoreCase(String processDefinitionKeyLikeIgnoreCase)
    Select historic process instances whose process definition key is like the given value, ignoring upper/lower case.

  - ### processDefinitionCategory

    HistoricProcessInstanceQuery processDefinitionCategory(String processDefinitionCategory)
    Only select historic process instances whose process definition category is processDefinitionCategory.

  - ### processDefinitionCategoryLike

    HistoricProcessInstanceQuery processDefinitionCategoryLike(String processDefinitionCategoryLike)
    Only select historic process instances whose process definition category is like the given value.

  - ### processDefinitionCategoryLikeIgnoreCase

    HistoricProcessInstanceQuery processDefinitionCategoryLikeIgnoreCase(String processDefinitionCategoryLikeIgnoreCase)
    Only select historic process instances whose process definition category is like the given value, ignoring upper/lower case.

  - ### processDefinitionName

    HistoricProcessInstanceQuery processDefinitionName(String processDefinitionName)
    Select process historic instances whose process definition name is processDefinitionName

  - ### processDefinitionNameLike

    HistoricProcessInstanceQuery processDefinitionNameLike(String processDefinitionNameLike)
    Select process historic instances whose process definition name is like the given value

  - ### processDefinitionNameLikeIgnoreCase

    HistoricProcessInstanceQuery processDefinitionNameLikeIgnoreCase(String processDefinitionNameLikeIgnoreCase)
    Select process historic instances whose process definition name is like the given value, ignoring upper/lower case

  - ### processDefinitionVersion

    HistoricProcessInstanceQuery processDefinitionVersion(Integer processDefinitionVersion)
    Only select historic process instances with a certain process definition version. Particularly useful when used in combination with `processDefinitionKey(String)`

  - ### processInstanceBusinessKey

    HistoricProcessInstanceQuery processInstanceBusinessKey(String processInstanceBusinessKey)
    Only select historic process instances with the given business key

  - ### processInstanceBusinessKeyLike

    HistoricProcessInstanceQuery processInstanceBusinessKeyLike(String businessKeyLike)
    Only select historic process instances with a business key like the given value.

  - ### processInstanceBusinessKeyLikeIgnoreCase

    HistoricProcessInstanceQuery processInstanceBusinessKeyLikeIgnoreCase(String businessKeyLikeIgnoreCase)
    Only select historic process instances with a business key like the given value, ignoring upper/lower case.

  - ### processInstanceBusinessStatus

    HistoricProcessInstanceQuery processInstanceBusinessStatus(String businessStatus)
    Only select historic process instances with the given business status

  - ### processInstanceBusinessStatusLike

    HistoricProcessInstanceQuery processInstanceBusinessStatusLike(String businessStatusLike)
    Only select historic process instances with a business status like the given value.

  - ### processInstanceBusinessStatusLikeIgnoreCase

    HistoricProcessInstanceQuery processInstanceBusinessStatusLikeIgnoreCase(String businessStatusLikeIgnoreCase)
    Only select historic process instances with a business status like the given value, ignoring upper/lower case.

  - ### processInstanceRootScopeId

    HistoricProcessInstanceQuery processInstanceRootScopeId(String rootScopeId)
    Only select historic process instances with a root instance with a name like the given value.

  - ### processInstanceParentScopeId

    HistoricProcessInstanceQuery processInstanceParentScopeId(String parentScopeId)
    Only select historic process instances with the given parent process instance id.

  - ### deploymentId

    HistoricProcessInstanceQuery deploymentId(String deploymentId)
    Only select historic process instances that are defined by a process definition with the given deployment identifier.

  - ### deploymentIdIn

    HistoricProcessInstanceQuery deploymentIdIn(List<String> deploymentIds)
    Only select historic process instances that are defined by a process definition with one of the given deployment identifiers.

  - ### finished

    HistoricProcessInstanceQuery finished()
    Only select historic process instances that are completely finished.

  - ### unfinished

    HistoricProcessInstanceQuery unfinished()
    Only select historic process instance that are not yet finished.

  - ### deleted

    HistoricProcessInstanceQuery deleted()
    Only select historic process instances that are deleted.

  - ### notDeleted

    HistoricProcessInstanceQuery notDeleted()
    Only select historic process instance that are not deleted.

  - ### activeActivityId

    HistoricProcessInstanceQuery activeActivityId(String activityId)
    Select the historic process instances which have an active activity instance like the provided id.

  - ### activeActivityIds

    HistoricProcessInstanceQuery activeActivityIds(Set<String> activityIds)
    Select the historic process instances which have an active activity instance like the provided ids.

  - ### involvedUser

    HistoricProcessInstanceQuery involvedUser(String userId)
    Only select the historic process instances with which the user with the given id is involved.

  - ### involvedUser

    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.

  - ### involvedGroup

    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.

  - ### involvedGroups

    HistoricProcessInstanceQuery involvedGroups(Set<String> groups)
    Only select the historic process instances with which the group with the given ids are involved.

  - ### variableValueEquals

    HistoricProcessInstanceQuery variableValueEquals(String name, Object value)
    Only select process instances which had a global variable with the given value when they ended. The type only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! A variable type is determined based on the value, using types configured in `ProcessEngineConfigurationImpl.getVariableTypes()`. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - of the variable, cannot be null.

  - ### localVariableValueEquals

    HistoricProcessInstanceQuery localVariableValueEquals(String name, Object value)
    Only select process instances which had a local variable with the given value when they ended. The type only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! A variable type is determined based on the value, using types configured in `ProcessEngineConfigurationImpl.getVariableTypes()`. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - of the variable, cannot be null.

  - ### variableValueEquals

    HistoricProcessInstanceQuery variableValueEquals(Object value)
    Only select process instances which had at least one global variable with the given value when they ended. The type only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! A variable type is determined based on the value, using types configured in `ProcessEngineConfigurationImpl.getVariableTypes()`. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.

  - ### localVariableValueEquals

    HistoricProcessInstanceQuery localVariableValueEquals(Object value)
    Only select process instances which had at least one local variable with the given value when they ended. The type only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! A variable type is determined based on the value, using types configured in `ProcessEngineConfigurationImpl.getVariableTypes()`. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.

  - ### variableValueEqualsIgnoreCase

    HistoricProcessInstanceQuery variableValueEqualsIgnoreCase(String name, String value)
    Only select historic process instances which have a global string variable with the given value, case insensitive.
    Parameters:
      `name` - name of the variable, cannot be null.
      `value` - value of the variable, cannot be null.

  - ### localVariableValueEqualsIgnoreCase

    HistoricProcessInstanceQuery localVariableValueEqualsIgnoreCase(String name, String value)
    Only select historic process instances which have a local string variable with the given value, case insensitive.
    Parameters:
      `name` - name of the variable, cannot be null.
      `value` - value of the variable, cannot be null.

  - ### variableValueNotEqualsIgnoreCase

    HistoricProcessInstanceQuery variableValueNotEqualsIgnoreCase(String name, String value)
    Only select historic process instances which have a global string variable not matching the given value, case insensitive.
    Parameters:
      `name` - name of the variable, cannot be null.
      `value` - value of the variable, cannot be null.

  - ### localVariableValueNotEqualsIgnoreCase

    HistoricProcessInstanceQuery localVariableValueNotEqualsIgnoreCase(String name, String value)
    Only select historic process instances which have a local string variable not matching the given value, case insensitive.
    Parameters:
      `name` - name of the variable, cannot be null.
      `value` - value of the variable, cannot be null.

  - ### variableValueNotEquals

    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. Only select process instances which have a variable value greater than the passed value. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - of the variable, cannot be null.

  - ### localVariableValueNotEquals

    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. Only select process instances which have a variable value greater than the passed value. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - of the variable, cannot be null.

  - ### variableValueGreaterThan

    HistoricProcessInstanceQuery variableValueGreaterThan(String name, Object value)
    Only select process instances which had a global variable value greater than the passed value when they ended. Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported. Only select process instances which have a variable value greater than the passed value.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### localVariableValueGreaterThan

    HistoricProcessInstanceQuery localVariableValueGreaterThan(String name, Object value)
    Only select process instances which had a local variable value greater than the passed value when they ended. Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported. Only select process instances which have a variable value greater than the passed value.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### variableValueGreaterThanOrEqual

    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. Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported. Only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead!
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### localVariableValueGreaterThanOrEqual

    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. Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported. Only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead!
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### variableValueLessThan

    HistoricProcessInstanceQuery variableValueLessThan(String name, Object value)
    Only select process instances which had a global variable value less than the passed value when the ended. Only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### localVariableValueLessThan

    HistoricProcessInstanceQuery localVariableValueLessThan(String name, Object value)
    Only select process instances which had a local variable value less than the passed value when the ended. Only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### variableValueLessThanOrEqual

    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. Only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### localVariableValueLessThanOrEqual

    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. Only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### variableValueLike

    HistoricProcessInstanceQuery variableValueLike(String name, String value)
    Only select process instances which had a global variable value like the given value when they ended. Only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! This can be used on string variables only.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).

  - ### localVariableValueLike

    HistoricProcessInstanceQuery localVariableValueLike(String name, String value)
    Only select process instances which had a local variable value like the given value when they ended. Only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! This can be used on string variables only.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).

  - ### variableValueLikeIgnoreCase

    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. Only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! This can be used on string variables only.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).

  - ### localVariableValueLikeIgnoreCase

    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. Only applies to already ended process instances, otherwise use a `ProcessInstanceQuery` instead! This can be used on string variables only.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).

  - ### variableExists

    HistoricProcessInstanceQuery variableExists(String name)
    Only select process instances which have a global variable with the given name.
    Parameters:
      `name` - cannot be null.

  - ### localVariableExists

    HistoricProcessInstanceQuery localVariableExists(String name)
    Only select process instances which have a local variable with the given name.
    Parameters:
      `name` - cannot be null.

  - ### variableNotExists

    HistoricProcessInstanceQuery variableNotExists(String name)
    Only select process instances which does not have a global variable with the given name.
    Parameters:
      `name` - cannot be null.

  - ### localVariableNotExists

    HistoricProcessInstanceQuery localVariableNotExists(String name)
    Only select process instances which does not have a local variable with the given name.
    Parameters:
      `name` - cannot be null.

  - ### startedBefore

    HistoricProcessInstanceQuery startedBefore(Date date)
    Only select historic process instances that were started before the given date.

  - ### startedAfter

    HistoricProcessInstanceQuery startedAfter(Date date)
    Only select historic process instances that were started after the given date.

  - ### finishedBefore

    HistoricProcessInstanceQuery finishedBefore(Date date)
    Only select historic process instances that were finished before the given date.

  - ### finishedAfter

    HistoricProcessInstanceQuery finishedAfter(Date date)
    Only select historic process instances that were finished after the given date.

  - ### startedBy

    HistoricProcessInstanceQuery startedBy(String userId)
    Only select historic process instance that are started by the given user.

  - ### processInstanceTenantId

    HistoricProcessInstanceQuery processInstanceTenantId(String tenantId)
    Only select process instances that have the given tenant id.

  - ### processInstanceTenantIdLike

    HistoricProcessInstanceQuery processInstanceTenantIdLike(String tenantIdLike)
    Only select process instances with a tenant id like the given one.

  - ### processInstanceTenantIdLikeIgnoreCase

    HistoricProcessInstanceQuery processInstanceTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase)
    Only select process instances with a tenant id like the given one, ignoring upper/lower case.

  - ### processInstanceWithoutTenantId

    HistoricProcessInstanceQuery processInstanceWithoutTenantId()
    Only select process instances that do not have a tenant id.

  - ### or

    HistoricProcessInstanceQuery or()
    Begin an OR statement. Make sure you invoke the endOr method at the end of your OR statement. Only one OR statement is allowed, for the second call to this method an exception will be thrown.

  - ### endOr

    HistoricProcessInstanceQuery endOr()
    End an OR statement. Only one OR statement is allowed, for the second call to this method an exception will be thrown.

  - ### orderByProcessInstanceId

    HistoricProcessInstanceQuery orderByProcessInstanceId()
    Order by the process instance id (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessDefinitionId

    HistoricProcessInstanceQuery orderByProcessDefinitionId()
    Order by the process definition id (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessInstanceBusinessKey

    HistoricProcessInstanceQuery orderByProcessInstanceBusinessKey()
    Order by the business key (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessInstanceStartTime

    HistoricProcessInstanceQuery orderByProcessInstanceStartTime()
    Order by the start time (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessInstanceEndTime

    HistoricProcessInstanceQuery orderByProcessInstanceEndTime()
    Order by the end time (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessInstanceDuration

    HistoricProcessInstanceQuery orderByProcessInstanceDuration()
    Order by the duration of the process instance (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByTenantId

    HistoricProcessInstanceQuery orderByTenantId()
    Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### superProcessInstanceId

    HistoricProcessInstanceQuery superProcessInstanceId(String superProcessInstanceId)
    Only select historic process instances started by the given process instance. `ProcessInstance` ids and `HistoricProcessInstance` ids match.

  - ### excludeSubprocesses

    HistoricProcessInstanceQuery excludeSubprocesses(boolean excludeSubprocesses)
    Exclude sub processes from the query result;

  - ### includeProcessVariables

    HistoricProcessInstanceQuery includeProcessVariables()
    Include process variables in the process query result

  - ### includeProcessVariables

    HistoricProcessInstanceQuery includeProcessVariables(Collection<String> variableNames)
    Include the process variables with the given names into the query result.

  - ### withJobException

    HistoricProcessInstanceQuery withJobException()
    Only select process instances that failed due to an exception happening during a job execution.

  - ### processInstanceName

    HistoricProcessInstanceQuery processInstanceName(String name)
    Only select process instances with the given name.

  - ### processInstanceNameLike

    HistoricProcessInstanceQuery processInstanceNameLike(String nameLike)
    Only select process instances with a name like the given value.

  - ### processInstanceNameLikeIgnoreCase

    HistoricProcessInstanceQuery processInstanceNameLikeIgnoreCase(String nameLikeIgnoreCase)
    Only select process instances with a name like the given value, ignoring upper/lower case.

  - ### processInstanceCallbackId

    HistoricProcessInstanceQuery processInstanceCallbackId(String callbackId)
    Only select process instances with the given callback identifier.

  - ### processInstanceCallbackType

    HistoricProcessInstanceQuery processInstanceCallbackType(String callbackType)
    Only select process instances with the given callback type.

  - ### parentCaseInstanceId

    HistoricProcessInstanceQuery parentCaseInstanceId(String parentCaseInstanceId)
    Only select process instances with the given parent case instance id.

  - ### withoutProcessInstanceCallbackId

    HistoricProcessInstanceQuery withoutProcessInstanceCallbackId()
    Only select process instances that do not have a callback identifier.

  - ### processInstanceReferenceId

    HistoricProcessInstanceQuery processInstanceReferenceId(String referenceId)
    Only select process instances with the given reference identifier.

  - ### processInstanceReferenceType

    HistoricProcessInstanceQuery processInstanceReferenceType(String referenceType)
    Only select process instances with the given reference type.

  - ### locale

    HistoricProcessInstanceQuery locale(String locale)
    Localize historic process name and description to specified locale.

  - ### withLocalizationFallback

    HistoricProcessInstanceQuery withLocalizationFallback()
    Instruct localization to fallback to more general locales including the default locale of the JVM if the specified locale is not found.

  - ### withoutSorting

    HistoricProcessInstanceQuery withoutSorting()
    Perform the query without applying sorting parameters. By default sorting will be applied.

  - ### returnIdsOnly

    HistoricProcessInstanceQuery returnIdsOnly()
    Return only the id value of the process instances, to reduce any additional instance data to be returned.