Package org.flowable.cmmn.api.history

# Interface HistoricCaseInstanceQuery

All Superinterfaces:
  `BatchDeleteQuery<HistoricCaseInstanceQuery>`, `DeleteQuery<HistoricCaseInstanceQuery,HistoricCaseInstance>`, `Query<HistoricCaseInstanceQuery,HistoricCaseInstance>`

public interface HistoricCaseInstanceQuery extends Query<HistoricCaseInstanceQuery,HistoricCaseInstance>, DeleteQuery<HistoricCaseInstanceQuery,HistoricCaseInstance>, BatchDeleteQuery<HistoricCaseInstanceQuery>

Author:
  Joram Barrez, Tijs Rademakers

- ## 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
  `HistoricCaseInstanceQuery`
  `activePlanItemDefinitionId(String planItemDefinitionId)`
  Select the historic case instances with an active plan item definition id equal to the provided definition id.
  `HistoricCaseInstanceQuery`
  `activePlanItemDefinitionIds(Set<String> planItemDefinitionIds)`
  Select the historic case instances with an active plan item definition id equal to one of the provided definition ids.
  `HistoricCaseInstanceQuery`
  `caseDefinitionCategory(String caseDefinitionCategory)`
  Only select historic case instances with the given case definition category.
  `HistoricCaseInstanceQuery`
  `caseDefinitionCategoryLike(String caseDefinitionCategoryLike)`
  Only select historic case instances with a case definition category like the given value.
  `HistoricCaseInstanceQuery`
  `caseDefinitionCategoryLikeIgnoreCase(String caseDefinitionCategoryLikeIgnoreCase)`
  Only select historic case instances with a case definition category like the given value, ignoring upper/lower case.
  `HistoricCaseInstanceQuery`
  `caseDefinitionId(String caseDefinitionId)`
  Only select historic case instances with the given case definition identifier.
  `HistoricCaseInstanceQuery`
  `caseDefinitionIds(Set<String> caseDefinitionIds)`
  Only select historic case instances with the given case definition ids.
  `HistoricCaseInstanceQuery`
  `caseDefinitionKey(String caseDefinitionKey)`
  Only select historic case instances with the given key.
  `HistoricCaseInstanceQuery`
  `caseDefinitionKeyLike(String caseDefinitionKeyLike)`
  Only select historic case instances with a definition key like the given value.
  `HistoricCaseInstanceQuery`
  `caseDefinitionKeyLikeIgnoreCase(String caseDefinitionKeyLikeIgnoreCase)`
  Only select historic case instances with a definition key like the given value, ignoring upper/lower case.
  `HistoricCaseInstanceQuery`
  `caseDefinitionKeys(Set<String> caseDefinitionKeys)`
  Only select historic case instances with the given keys.
  `HistoricCaseInstanceQuery`
  `caseDefinitionName(String caseDefinitionName)`
  Only select historic case instances with the given case definition name.
  `HistoricCaseInstanceQuery`
  `caseDefinitionNameLike(String caseDefinitionNameLike)`
  Only select historic case instances with a case definition name like the given value.
  `HistoricCaseInstanceQuery`
  `caseDefinitionNameLikeIgnoreCase(String caseDefinitionNameLikeIgnoreCase)`
  Only select historic case instances with a case definition name like the given value, ignoring upper/lower case.
  `HistoricCaseInstanceQuery`
  `caseDefinitionVersion(Integer caseDefinitionVersion)`
  Only select historic case instances with the given case definition version.
  `HistoricCaseInstanceQuery`
  `caseInstanceBusinessKey(String caseInstanceBusinessKey)`
  Only select historic case instances with the given business key.
  `HistoricCaseInstanceQuery`
  `caseInstanceBusinessKeyLike(String caseInstanceBusinessKeyLike)`
  Only select historic case instances with a business key like the given value.
  `HistoricCaseInstanceQuery`
  `caseInstanceBusinessKeyLikeIgnoreCase(String caseInstanceBusinessKeyLikeIgnoreCase)`
  Only select historic case instances with a business key like the given value, ignoring upper/lower case.
  `HistoricCaseInstanceQuery`
  `caseInstanceBusinessStatus(String caseInstanceBusinessStatus)`
  Only select historic case instances with the given business status.
  `HistoricCaseInstanceQuery`
  `caseInstanceBusinessStatusLike(String caseInstanceBusinessStatusLike)`
  Only select historic case instances with a business status like the given value.
  `HistoricCaseInstanceQuery`
  `caseInstanceBusinessStatusLikeIgnoreCase(String caseInstanceBusinessStatusLikeIgnoreCase)`
  Only select historic case instances with a business status like the given value, ignoring upper/lower case.
  `HistoricCaseInstanceQuery`
  `caseInstanceCallbackId(String callbackId)`
  Only select historic case instances that have the provided callback identifier.
  `HistoricCaseInstanceQuery`
  `caseInstanceCallbackType(String callbackType)`
  Only select historic case instances that have the provided callback type.
  `HistoricCaseInstanceQuery`
  `caseInstanceId(String caseInstanceId)`
  Only select historic case instances with the given identifier.
  `HistoricCaseInstanceQuery`
  `caseInstanceIds(Set<String> caseInstanceIds)`
  Only select historic case instances with one the given identifiers.
  `HistoricCaseInstanceQuery`
  `caseInstanceName(String caseInstanceName)`
  Only select historic case instances with the given name.
  `HistoricCaseInstanceQuery`
  `caseInstanceNameLike(String caseInstanceNameLike)`
  Only select historic case instances like the given name.
  `HistoricCaseInstanceQuery`
  `caseInstanceNameLikeIgnoreCase(String nameLikeIgnoreCase)`
  Only select case instances that have a name like (case insensitive) the given name.
  `HistoricCaseInstanceQuery`
  `caseInstanceParentId(String parentId)`
  Only select historic case instances with the parent identifier.
  `HistoricCaseInstanceQuery`
  `caseInstanceParentScopeId(String parentScopeId)`
  Only select historic case instances with the given case instance parent scope id.
  `HistoricCaseInstanceQuery`
  `caseInstanceReferenceId(String referenceId)`
  Only select historic case instance that have the provided reference identifier.
  `HistoricCaseInstanceQuery`
  `caseInstanceReferenceType(String referenceType)`
  Only select historic case instance that have the provided reference type.
  `HistoricCaseInstanceQuery`
  `caseInstanceRootScopeId(String rootScopeId)`
  Only select historic case instances with the given case instance root scope id.
  `HistoricCaseInstanceQuery`
  `caseInstanceTenantId(String tenantId)`
  Only select historic case instances that have the tenant identifier.
  `HistoricCaseInstanceQuery`
  `caseInstanceTenantIdLike(String tenantIdLike)`
  Only select historic case instances with a tenant identifier like the given value.
  `HistoricCaseInstanceQuery`
  `caseInstanceTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase)`
  Only select historic case instances with a tenant identifier like the given value, ignoring upper/lower case.
  `HistoricCaseInstanceQuery`
  `caseInstanceWithoutTenantId()`
  Only select historic case instances that have no tenant identifier.
  `HistoricCaseInstanceQuery`
  `deploymentId(String deploymentId)`
  Only select historic case instances that are defined by a case definition with the given deployment identifier.
  `HistoricCaseInstanceQuery`
  `deploymentIds(List<String> deploymentIds)`
  Only select historic case instances that are defined by a case definition with one of the given deployment identifiers.
  `HistoricCaseInstanceQuery`
  `endOr()`
  End an OR statement.
  `HistoricCaseInstanceQuery`
  `excludeCaseDefinitionKeys(Set<String> caseDefinitionKeys)`
  Only select historic case instances that don't match the given case definition keys.
  `HistoricCaseInstanceQuery`
  `finished()`
  Only select historic case instances that are finished.
  `HistoricCaseInstanceQuery`
  `finishedAfter(Date afterTime)`
  Only select historic case instances that are finished after the provided date time.
  `HistoricCaseInstanceQuery`
  `finishedBefore(Date beforeTime)`
  Only select historic case instances that are finished before the provided date time.
  `HistoricCaseInstanceQuery`
  `includeCaseVariables()`
  Include historic case variables in the historic case query result
  `HistoricCaseInstanceQuery`
  `includeCaseVariables(Collection<String> variableNames)`
  Include the historic case variables with the given names into the query result.
  `HistoricCaseInstanceQuery`
  `involvedGroup(String groupId, String identityLinkType)`
  Select the historic case instances with which the group with the given id and identity link type are involved.
  `HistoricCaseInstanceQuery`
  `involvedGroups(Set<String> groupIds)`
  Select the historic case instances with which the groups with the given ids are involved.
  `HistoricCaseInstanceQuery`
  `involvedUser(String userId)`
  Select the historic case instances with which the user with the given id is involved.
  `HistoricCaseInstanceQuery`
  `involvedUser(String userId, String identityLinkType)`
  Select the historic case instances with which the user with the given id and identity link type are involved.
  `HistoricCaseInstanceQuery`
  `lastReactivatedAfter(Date afterTime)`
  Only select historic case instance that are reactivated after the provided date time.
  `HistoricCaseInstanceQuery`
  `lastReactivatedBefore(Date beforeTime)`
  Only select historic case instance that are reactivated before the provided date time.
  `HistoricCaseInstanceQuery`
  `lastReactivatedBy(String userId)`
  Only select historic case instances that are reactivated by the provided user identifier.
  `HistoricCaseInstanceQuery`
  `locale(String locale)`
  Localize case name to specified locale.
  `HistoricCaseInstanceQuery`
  `or()`
  Begin an OR statement.
  `HistoricCaseInstanceQuery`
  `orderByCaseDefinitionId()`
  `HistoricCaseInstanceQuery`
  `orderByCaseDefinitionKey()`
  `HistoricCaseInstanceQuery`
  `orderByCaseInstanceId()`
  `HistoricCaseInstanceQuery`
  `orderByCaseInstanceName()`
  `HistoricCaseInstanceQuery`
  `orderByEndTime()`
  `HistoricCaseInstanceQuery`
  `orderByStartTime()`
  `HistoricCaseInstanceQuery`
  `orderByTenantId()`
  `HistoricCaseInstanceQuery`
  `parentCaseInstanceId(String parentCaseInstanceId)`
  Only select historic case instances that have a parent case instance with the provided id.
  `HistoricCaseInstanceQuery`
  `returnIdsOnly()`
  Return only the id value of the case instances, to reduce any additional instance data to be returned.
  `HistoricCaseInstanceQuery`
  `startedAfter(Date afterTime)`
  Only select historic case instances that are started after the provided date time.
  `HistoricCaseInstanceQuery`
  `startedBefore(Date beforeTime)`
  Only select historic case instances that are started before the provided date time.
  `HistoricCaseInstanceQuery`
  `startedBy(String userId)`
  Only select historic case instances that are started by the provided user identifier.
  `HistoricCaseInstanceQuery`
  `state(String state)`
  Only select historic case instances that have a state that is equal to the provided value.
  `HistoricCaseInstanceQuery`
  `unfinished()`
  Only select historic case instances that are not finished.
  `HistoricCaseInstanceQuery`
  `variableExists(String name)`
  Only select case instances which have a variable with the given name.
  `HistoricCaseInstanceQuery`
  `variableNotExists(String name)`
  Only select case instances which does not have a variable with the given name.
  `HistoricCaseInstanceQuery`
  `variableValueEquals(Object value)`
  Only select case instances which had at least one global variable with the given value when they ended.
  `HistoricCaseInstanceQuery`
  `variableValueEquals(String name, Object value)`
  Only select case instances which had a global variable with the given value when they ended.
  `HistoricCaseInstanceQuery`
  `variableValueEqualsIgnoreCase(String name, String value)`
  Only select historic case instances which have a string variable with the given value, case insensitive.
  `HistoricCaseInstanceQuery`
  `variableValueGreaterThan(String name, Object value)`
  Only select case instances which had a global variable value greater than the passed value when they ended.
  `HistoricCaseInstanceQuery`
  `variableValueGreaterThanOrEqual(String name, Object value)`
  Only select case instances which had a global variable value greater than or equal to the passed value when they ended.
  `HistoricCaseInstanceQuery`
  `variableValueLessThan(String name, Object value)`
  Only select case instances which had a global variable value less than the passed value when the ended.
  `HistoricCaseInstanceQuery`
  `variableValueLessThanOrEqual(String name, Object value)`
  Only select case instances which has a global variable value less than or equal to the passed value when they ended.
  `HistoricCaseInstanceQuery`
  `variableValueLike(String name, String value)`
  Only select case instances which had global variable value like the given value when they ended.
  `HistoricCaseInstanceQuery`
  `variableValueLikeIgnoreCase(String name, String value)`
  Only select case instances which had global variable value like (case insensitive) the given value when they ended.
  `HistoricCaseInstanceQuery`
  `variableValueNotEquals(String name, Object value)`
  Only select case instances which had a global variable with the given name, but with a different value than the passed value when they ended.
  `HistoricCaseInstanceQuery`
  `withLocalizationFallback()`
  Instruct localization to fallback to more general locales including the default locale of the JVM if the specified locale is not found.
  `HistoricCaseInstanceQuery`
  `withoutCaseInstanceCallbackId()`
  Only select historic case instances that do not have a callback identifier.
  `HistoricCaseInstanceQuery`
  `withoutCaseInstanceParent()`
  Only select historic case instances without a parent identifier.
  `HistoricCaseInstanceQuery`
  `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

  - ### caseInstanceId

    HistoricCaseInstanceQuery caseInstanceId(String caseInstanceId)
    Only select historic case instances with the given identifier.

  - ### caseInstanceIds

    HistoricCaseInstanceQuery caseInstanceIds(Set<String> caseInstanceIds)
    Only select historic case instances with one the given identifiers.

  - ### caseInstanceName

    HistoricCaseInstanceQuery caseInstanceName(String caseInstanceName)
    Only select historic case instances with the given name.

  - ### caseInstanceNameLike

    HistoricCaseInstanceQuery caseInstanceNameLike(String caseInstanceNameLike)
    Only select historic case instances like the given name.

  - ### caseInstanceNameLikeIgnoreCase

    HistoricCaseInstanceQuery caseInstanceNameLikeIgnoreCase(String nameLikeIgnoreCase)
    Only select case instances that have a name like (case insensitive) the given name.
    Parameters:
      `nameLikeIgnoreCase` - cannot be null. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).

  - ### caseInstanceBusinessKey

    HistoricCaseInstanceQuery caseInstanceBusinessKey(String caseInstanceBusinessKey)
    Only select historic case instances with the given business key.

  - ### caseInstanceBusinessKeyLike

    HistoricCaseInstanceQuery caseInstanceBusinessKeyLike(String caseInstanceBusinessKeyLike)
    Only select historic case instances with a business key like the given value.

  - ### caseInstanceBusinessKeyLikeIgnoreCase

    HistoricCaseInstanceQuery caseInstanceBusinessKeyLikeIgnoreCase(String caseInstanceBusinessKeyLikeIgnoreCase)
    Only select historic case instances with a business key like the given value, ignoring upper/lower case.

  - ### caseInstanceRootScopeId

    HistoricCaseInstanceQuery caseInstanceRootScopeId(String rootScopeId)
    Only select historic case instances with the given case instance root scope id.

  - ### caseInstanceParentScopeId

    HistoricCaseInstanceQuery caseInstanceParentScopeId(String parentScopeId)
    Only select historic case instances with the given case instance parent scope id.

  - ### caseInstanceBusinessStatus

    HistoricCaseInstanceQuery caseInstanceBusinessStatus(String caseInstanceBusinessStatus)
    Only select historic case instances with the given business status.

  - ### caseInstanceBusinessStatusLike

    HistoricCaseInstanceQuery caseInstanceBusinessStatusLike(String caseInstanceBusinessStatusLike)
    Only select historic case instances with a business status like the given value.

  - ### caseInstanceBusinessStatusLikeIgnoreCase

    HistoricCaseInstanceQuery caseInstanceBusinessStatusLikeIgnoreCase(String caseInstanceBusinessStatusLikeIgnoreCase)
    Only select historic case instances with a business status like the given value, ignoring upper/lower case.

  - ### caseInstanceParentId

    HistoricCaseInstanceQuery caseInstanceParentId(String parentId)
    Only select historic case instances with the parent identifier.

  - ### withoutCaseInstanceParent

    HistoricCaseInstanceQuery withoutCaseInstanceParent()
    Only select historic case instances without a parent identifier.

  - ### caseDefinitionKey

    HistoricCaseInstanceQuery caseDefinitionKey(String caseDefinitionKey)
    Only select historic case instances with the given key.

  - ### caseDefinitionKeyLike

    HistoricCaseInstanceQuery caseDefinitionKeyLike(String caseDefinitionKeyLike)
    Only select historic case instances with a definition key like the given value.

  - ### caseDefinitionKeyLikeIgnoreCase

    HistoricCaseInstanceQuery caseDefinitionKeyLikeIgnoreCase(String caseDefinitionKeyLikeIgnoreCase)
    Only select historic case instances with a definition key like the given value, ignoring upper/lower case.

  - ### caseDefinitionKeys

    HistoricCaseInstanceQuery caseDefinitionKeys(Set<String> caseDefinitionKeys)
    Only select historic case instances with the given keys.

  - ### excludeCaseDefinitionKeys

    HistoricCaseInstanceQuery excludeCaseDefinitionKeys(Set<String> caseDefinitionKeys)
    Only select historic case instances that don't match the given case definition keys.

  - ### caseDefinitionId

    HistoricCaseInstanceQuery caseDefinitionId(String caseDefinitionId)
    Only select historic case instances with the given case definition identifier.

  - ### caseDefinitionIds

    HistoricCaseInstanceQuery caseDefinitionIds(Set<String> caseDefinitionIds)
    Only select historic case instances with the given case definition ids.

  - ### caseDefinitionCategory

    HistoricCaseInstanceQuery caseDefinitionCategory(String caseDefinitionCategory)
    Only select historic case instances with the given case definition category.

  - ### caseDefinitionCategoryLike

    HistoricCaseInstanceQuery caseDefinitionCategoryLike(String caseDefinitionCategoryLike)
    Only select historic case instances with a case definition category like the given value.

  - ### caseDefinitionCategoryLikeIgnoreCase

    HistoricCaseInstanceQuery caseDefinitionCategoryLikeIgnoreCase(String caseDefinitionCategoryLikeIgnoreCase)
    Only select historic case instances with a case definition category like the given value, ignoring upper/lower case.

  - ### caseDefinitionName

    HistoricCaseInstanceQuery caseDefinitionName(String caseDefinitionName)
    Only select historic case instances with the given case definition name.

  - ### caseDefinitionNameLike

    HistoricCaseInstanceQuery caseDefinitionNameLike(String caseDefinitionNameLike)
    Only select historic case instances with a case definition name like the given value.

  - ### caseDefinitionNameLikeIgnoreCase

    HistoricCaseInstanceQuery caseDefinitionNameLikeIgnoreCase(String caseDefinitionNameLikeIgnoreCase)
    Only select historic case instances with a case definition name like the given value, ignoring upper/lower case.

  - ### caseDefinitionVersion

    HistoricCaseInstanceQuery caseDefinitionVersion(Integer caseDefinitionVersion)
    Only select historic case instances with the given case definition version.

  - ### includeCaseVariables

    HistoricCaseInstanceQuery includeCaseVariables()
    Include historic case variables in the historic case query result

  - ### includeCaseVariables

    HistoricCaseInstanceQuery includeCaseVariables(Collection<String> variableNames)
    Include the historic case variables with the given names into the query result.

  - ### deploymentId

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

  - ### deploymentIds

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

  - ### finished

    HistoricCaseInstanceQuery finished()
    Only select historic case instances that are finished.

  - ### unfinished

    HistoricCaseInstanceQuery unfinished()
    Only select historic case instances that are not finished.

  - ### startedBefore

    HistoricCaseInstanceQuery startedBefore(Date beforeTime)
    Only select historic case instances that are started before the provided date time.

  - ### startedAfter

    HistoricCaseInstanceQuery startedAfter(Date afterTime)
    Only select historic case instances that are started after the provided date time.

  - ### finishedBefore

    HistoricCaseInstanceQuery finishedBefore(Date beforeTime)
    Only select historic case instances that are finished before the provided date time.

  - ### finishedAfter

    HistoricCaseInstanceQuery finishedAfter(Date afterTime)
    Only select historic case instances that are finished after the provided date time.

  - ### startedBy

    HistoricCaseInstanceQuery startedBy(String userId)
    Only select historic case instances that are started by the provided user identifier.

  - ### state

    HistoricCaseInstanceQuery state(String state)
    Only select historic case instances that have a state that is equal to the provided value.

  - ### lastReactivatedBefore

    HistoricCaseInstanceQuery lastReactivatedBefore(Date beforeTime)
    Only select historic case instance that are reactivated before the provided date time.

  - ### lastReactivatedAfter

    HistoricCaseInstanceQuery lastReactivatedAfter(Date afterTime)
    Only select historic case instance that are reactivated after the provided date time.

  - ### lastReactivatedBy

    HistoricCaseInstanceQuery lastReactivatedBy(String userId)
    Only select historic case instances that are reactivated by the provided user identifier.

  - ### caseInstanceCallbackId

    HistoricCaseInstanceQuery caseInstanceCallbackId(String callbackId)
    Only select historic case instances that have the provided callback identifier.

  - ### caseInstanceCallbackType

    HistoricCaseInstanceQuery caseInstanceCallbackType(String callbackType)
    Only select historic case instances that have the provided callback type.

  - ### parentCaseInstanceId

    HistoricCaseInstanceQuery parentCaseInstanceId(String parentCaseInstanceId)
    Only select historic case instances that have a parent case instance with the provided id.

  - ### withoutCaseInstanceCallbackId

    HistoricCaseInstanceQuery withoutCaseInstanceCallbackId()
    Only select historic case instances that do not have a callback identifier.

  - ### caseInstanceReferenceId

    HistoricCaseInstanceQuery caseInstanceReferenceId(String referenceId)
    Only select historic case instance that have the provided reference identifier.

  - ### caseInstanceReferenceType

    HistoricCaseInstanceQuery caseInstanceReferenceType(String referenceType)
    Only select historic case instance that have the provided reference type.

  - ### caseInstanceTenantId

    HistoricCaseInstanceQuery caseInstanceTenantId(String tenantId)
    Only select historic case instances that have the tenant identifier.

  - ### caseInstanceTenantIdLike

    HistoricCaseInstanceQuery caseInstanceTenantIdLike(String tenantIdLike)
    Only select historic case instances with a tenant identifier like the given value.

  - ### caseInstanceTenantIdLikeIgnoreCase

    HistoricCaseInstanceQuery caseInstanceTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase)
    Only select historic case instances with a tenant identifier like the given value, ignoring upper/lower case.

  - ### caseInstanceWithoutTenantId

    HistoricCaseInstanceQuery caseInstanceWithoutTenantId()
    Only select historic case instances that have no tenant identifier.

  - ### or

    HistoricCaseInstanceQuery 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

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

  - ### activePlanItemDefinitionId

    HistoricCaseInstanceQuery activePlanItemDefinitionId(String planItemDefinitionId)
    Select the historic case instances with an active plan item definition id equal to the provided definition id.

  - ### activePlanItemDefinitionIds

    HistoricCaseInstanceQuery activePlanItemDefinitionIds(Set<String> planItemDefinitionIds)
    Select the historic case instances with an active plan item definition id equal to one of the provided definition ids.

  - ### involvedUser

    HistoricCaseInstanceQuery involvedUser(String userId)
    Select the historic case instances with which the user with the given id is involved.

  - ### involvedUser

    HistoricCaseInstanceQuery involvedUser(String userId, String identityLinkType)
    Select the historic case instances with which the user with the given id and identity link type are involved.

  - ### involvedGroup

    HistoricCaseInstanceQuery involvedGroup(String groupId, String identityLinkType)
    Select the historic case instances with which the group with the given id and identity link type are involved.

  - ### involvedGroups

    HistoricCaseInstanceQuery involvedGroups(Set<String> groupIds)
    Select the historic case instances with which the groups with the given ids are involved.

  - ### variableValueEquals

    HistoricCaseInstanceQuery variableValueEquals(String name, Object value)
    Only select case instances which had a global variable with the given value when they ended. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - of the variable, cannot be null.

  - ### variableValueEquals

    HistoricCaseInstanceQuery variableValueEquals(Object value)
    Only select case instances which had at least one global variable with the given value when they ended. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.

  - ### variableValueEqualsIgnoreCase

    HistoricCaseInstanceQuery variableValueEqualsIgnoreCase(String name, String value)
    Only select historic case instances which have a 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.

  - ### variableValueNotEquals

    HistoricCaseInstanceQuery variableValueNotEquals(String name, Object value)
    Only select case instances which had a global variable with the given name, but with a different value than the passed value when they ended. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - of the variable, cannot be null.

  - ### variableValueGreaterThan

    HistoricCaseInstanceQuery variableValueGreaterThan(String name, Object value)
    Only select case 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.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### variableValueGreaterThanOrEqual

    HistoricCaseInstanceQuery variableValueGreaterThanOrEqual(String name, Object value)
    Only select case 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.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### variableValueLessThan

    HistoricCaseInstanceQuery variableValueLessThan(String name, Object value)
    Only select case instances which had a global variable value less than the passed value when the ended. 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

    HistoricCaseInstanceQuery variableValueLessThanOrEqual(String name, Object value)
    Only select case instances which has a global variable value less 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.
    Parameters:
      `name` - cannot be null.
      `value` - cannot be null.

  - ### variableValueLike

    HistoricCaseInstanceQuery variableValueLike(String name, String value)
    Only select case instances which had global variable value like the given value when they ended. 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

    HistoricCaseInstanceQuery variableValueLikeIgnoreCase(String name, String value)
    Only select case instances which had global variable value like (case insensitive) the given value when they ended. 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

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

  - ### variableNotExists

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

  - ### locale

    HistoricCaseInstanceQuery locale(String locale)
    Localize case name to specified locale.

  - ### withLocalizationFallback

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

  - ### withoutSorting

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

  - ### returnIdsOnly

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

  - ### orderByCaseInstanceId

    HistoricCaseInstanceQuery orderByCaseInstanceId()

  - ### orderByCaseInstanceName

    HistoricCaseInstanceQuery orderByCaseInstanceName()

  - ### orderByCaseDefinitionKey

    HistoricCaseInstanceQuery orderByCaseDefinitionKey()

  - ### orderByCaseDefinitionId

    HistoricCaseInstanceQuery orderByCaseDefinitionId()

  - ### orderByStartTime

    HistoricCaseInstanceQuery orderByStartTime()

  - ### orderByEndTime

    HistoricCaseInstanceQuery orderByEndTime()

  - ### orderByTenantId

    HistoricCaseInstanceQuery orderByTenantId()