Package org.flowable.cmmn.api.runtime

# Interface CaseInstanceQuery

All Superinterfaces:
  `Query<CaseInstanceQuery,CaseInstance>`

public interface CaseInstanceQuery extends Query<CaseInstanceQuery,CaseInstance>

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
  `CaseInstanceQuery`
  `activePlanItemDefinitionId(String planItemDefinitionId)`
  Select the case instances with an active plan item definition id equal to the provided definition id.
  `CaseInstanceQuery`
  `activePlanItemDefinitionIds(Set<String> planItemDefinitionIds)`
  Select the case instances with an active plan item definition id equal to one of the provided definition ids.
  `CaseInstanceQuery`
  `caseDefinitionCategory(String caseDefinitionCategory)`
  `CaseInstanceQuery`
  `caseDefinitionCategoryLike(String caseDefinitionCategoryLike)`
  `CaseInstanceQuery`
  `caseDefinitionCategoryLikeIgnoreCase(String caseDefinitionCategoryLikeIgnoreCase)`
  `CaseInstanceQuery`
  `caseDefinitionId(String caseDefinitionId)`
  `CaseInstanceQuery`
  `caseDefinitionIds(Set<String> caseDefinitionIds)`
  `CaseInstanceQuery`
  `caseDefinitionKey(String caseDefinitionKey)`
  `CaseInstanceQuery`
  `caseDefinitionKeyLike(String caseDefinitionKeyLike)`
  `CaseInstanceQuery`
  `caseDefinitionKeyLikeIgnoreCase(String caseDefinitionKeyLikeIgnoreCase)`
  `CaseInstanceQuery`
  `caseDefinitionKeys(Set<String> caseDefinitionKeys)`
  `CaseInstanceQuery`
  `caseDefinitionName(String caseDefinitionName)`
  `CaseInstanceQuery`
  `caseDefinitionNameLike(String caseDefinitionNameLike)`
  `CaseInstanceQuery`
  `caseDefinitionNameLikeIgnoreCase(String caseDefinitionNameLikeIgnoreCase)`
  `CaseInstanceQuery`
  `caseDefinitionVersion(Integer caseDefinitionVersion)`
  `CaseInstanceQuery`
  `caseInstanceBusinessKey(String caseInstanceBusinessKey)`
  `CaseInstanceQuery`
  `caseInstanceBusinessKeyLike(String caseInstanceBusinessKeyLike)`
  `CaseInstanceQuery`
  `caseInstanceBusinessKeyLikeIgnoreCase(String caseInstanceBusinessKeyLikeIgnoreCase)`
  `CaseInstanceQuery`
  `caseInstanceBusinessStatus(String caseInstanceBusinessStatus)`
  `CaseInstanceQuery`
  `caseInstanceBusinessStatusLike(String caseInstanceBusinessStatusLike)`
  `CaseInstanceQuery`
  `caseInstanceBusinessStatusLikeIgnoreCase(String caseInstanceBusinessStatusLikeIgnoreCase)`
  `CaseInstanceQuery`
  `caseInstanceCallbackId(String callbackId)`
  `CaseInstanceQuery`
  `caseInstanceCallbackType(String callbackType)`
  `CaseInstanceQuery`
  `caseInstanceId(String caseInstanceId)`
  `CaseInstanceQuery`
  `caseInstanceIds(Set<String> caseInstanceIds)`
  `CaseInstanceQuery`
  `caseInstanceIsCompleteable()`
  `CaseInstanceQuery`
  `caseInstanceLastReactivatedAfter(Date afterTime)`
  `CaseInstanceQuery`
  `caseInstanceLastReactivatedBefore(Date beforeTime)`
  `CaseInstanceQuery`
  `caseInstanceLastReactivatedBy(String userId)`
  `CaseInstanceQuery`
  `caseInstanceName(String caseInstanceName)`
  `CaseInstanceQuery`
  `caseInstanceNameLike(String caseInstanceNameLike)`
  `CaseInstanceQuery`
  `caseInstanceNameLikeIgnoreCase(String caseInstanceNameLikeIgnoreCase)`
  `CaseInstanceQuery`
  `caseInstanceParentId(String parentId)`
  `CaseInstanceQuery`
  `caseInstanceParentScopeId(String parentScopeId)`
  `CaseInstanceQuery`
  `caseInstanceReferenceId(String referenceId)`
  `CaseInstanceQuery`
  `caseInstanceReferenceType(String referenceType)`
  `CaseInstanceQuery`
  `caseInstanceRootScopeId(String rootScopeId)`
  `CaseInstanceQuery`
  `caseInstanceStartedAfter(Date afterTime)`
  `CaseInstanceQuery`
  `caseInstanceStartedBefore(Date beforeTime)`
  `CaseInstanceQuery`
  `caseInstanceStartedBy(String userId)`
  `CaseInstanceQuery`
  `caseInstanceState(String state)`
  `CaseInstanceQuery`
  `caseInstanceTenantId(String tenantId)`
  `CaseInstanceQuery`
  `caseInstanceTenantIdLike(String tenantIdLike)`
  `CaseInstanceQuery`
  `caseInstanceTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase)`
  `CaseInstanceQuery`
  `caseInstanceWithoutTenantId()`
  `CaseInstanceQuery`
  `endOr()`
  End an OR statement.
  `CaseInstanceQuery`
  `excludeCaseDefinitionKeys(Set<String> caseDefinitionKeys)`
  `CaseInstanceQuery`
  `includeCaseVariables()`
  Includes case variables into the query result.
  `CaseInstanceQuery`
  `includeCaseVariables(Collection<String> variableNames)`
  Include the case variables with the given names into the query result.
  `CaseInstanceQuery`
  `involvedGroup(String groupId, String identityLinkType)`
  Select the case instances with which the group with the given id and identity link type are involved.
  `CaseInstanceQuery`
  `involvedGroups(Set<String> groupIds)`
  Select the case instances with which the groups with the given ids are involved.
  `CaseInstanceQuery`
  `involvedUser(String userId)`
  Select the case instances with which the user with the given id is involved.
  `CaseInstanceQuery`
  `involvedUser(String userId, String identityLinkType)`
  Select the case instances with which the user with the given id and identity link type are involved.
  `CaseInstanceQuery`
  `locale(String locale)`
  Localize case name to specified locale.
  `CaseInstanceQuery`
  `or()`
  Begin an OR statement.
  `CaseInstanceQuery`
  `orderByCaseDefinitionId()`
  `CaseInstanceQuery`
  `orderByCaseDefinitionKey()`
  `CaseInstanceQuery`
  `orderByCaseInstanceId()`
  `CaseInstanceQuery`
  `orderByStartTime()`
  `CaseInstanceQuery`
  `orderByTenantId()`
  `CaseInstanceQuery`
  `parentCaseInstanceId(String parentCaseInstanceId)`
  `CaseInstanceQuery`
  `variableExists(String name)`
  Only select case instances which have a variable with the given name.
  `CaseInstanceQuery`
  `variableNotExists(String name)`
  Only select case instances which don't have a variable with the given name.
  `CaseInstanceQuery`
  `variableValueEquals(Object value)`
  Only select case instances which have at least one global variable with the given value.
  `CaseInstanceQuery`
  `variableValueEquals(String name, Object value)`
  Only select case instances which have a global variable with the given value.
  `CaseInstanceQuery`
  `variableValueEqualsIgnoreCase(String name, String value)`
  Only select case instances which have a local string variable with the given value, case insensitive.
  `CaseInstanceQuery`
  `variableValueGreaterThan(String name, Object value)`
  Only select case instances which have a variable value greater than the passed value.
  `CaseInstanceQuery`
  `variableValueGreaterThanOrEqual(String name, Object value)`
  Only select case instances which have a global variable value greater than or equal to the passed value.
  `CaseInstanceQuery`
  `variableValueLessThan(String name, Object value)`
  Only select case instances which have a global variable value less than the passed value.
  `CaseInstanceQuery`
  `variableValueLessThanOrEqual(String name, Object value)`
  Only select case instances which have a global variable value less than or equal to the passed value.
  `CaseInstanceQuery`
  `variableValueLike(String name, String value)`
  Only select case instances which have a global variable value like the given value.
  `CaseInstanceQuery`
  `variableValueLikeIgnoreCase(String name, String value)`
  Only select case instances which have a global variable value like the given value (case insensitive).
  `CaseInstanceQuery`
  `variableValueNotEquals(String name, Object value)`
  Only select case instances which have a global variable with the given name, but with a different value than the passed value.
  `CaseInstanceQuery`
  `variableValueNotEqualsIgnoreCase(String name, String value)`
  Only select case instances which have a local string variable which is not the given value, case insensitive.
  `CaseInstanceQuery`
  `withLocalizationFallback()`
  Instruct localization to fallback to more general locales including the default locale of the JVM if the specified locale is not found.

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

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

- ## Method Details

  - ### caseDefinitionKey

    CaseInstanceQuery caseDefinitionKey(String caseDefinitionKey)

  - ### caseDefinitionKeyLike

    CaseInstanceQuery caseDefinitionKeyLike(String caseDefinitionKeyLike)

  - ### caseDefinitionKeyLikeIgnoreCase

    CaseInstanceQuery caseDefinitionKeyLikeIgnoreCase(String caseDefinitionKeyLikeIgnoreCase)

  - ### caseDefinitionKeys

    CaseInstanceQuery caseDefinitionKeys(Set<String> caseDefinitionKeys)

  - ### excludeCaseDefinitionKeys

    CaseInstanceQuery excludeCaseDefinitionKeys(Set<String> caseDefinitionKeys)

  - ### caseDefinitionId

    CaseInstanceQuery caseDefinitionId(String caseDefinitionId)

  - ### caseDefinitionIds

    CaseInstanceQuery caseDefinitionIds(Set<String> caseDefinitionIds)

  - ### caseDefinitionCategory

    CaseInstanceQuery caseDefinitionCategory(String caseDefinitionCategory)

  - ### caseDefinitionCategoryLike

    CaseInstanceQuery caseDefinitionCategoryLike(String caseDefinitionCategoryLike)

  - ### caseDefinitionCategoryLikeIgnoreCase

    CaseInstanceQuery caseDefinitionCategoryLikeIgnoreCase(String caseDefinitionCategoryLikeIgnoreCase)

  - ### caseDefinitionName

    CaseInstanceQuery caseDefinitionName(String caseDefinitionName)

  - ### caseDefinitionNameLike

    CaseInstanceQuery caseDefinitionNameLike(String caseDefinitionNameLike)

  - ### caseDefinitionNameLikeIgnoreCase

    CaseInstanceQuery caseDefinitionNameLikeIgnoreCase(String caseDefinitionNameLikeIgnoreCase)

  - ### caseDefinitionVersion

    CaseInstanceQuery caseDefinitionVersion(Integer caseDefinitionVersion)

  - ### caseInstanceId

    CaseInstanceQuery caseInstanceId(String caseInstanceId)

  - ### caseInstanceIds

    CaseInstanceQuery caseInstanceIds(Set<String> caseInstanceIds)

  - ### caseInstanceName

    CaseInstanceQuery caseInstanceName(String caseInstanceName)

  - ### caseInstanceNameLike

    CaseInstanceQuery caseInstanceNameLike(String caseInstanceNameLike)

  - ### caseInstanceNameLikeIgnoreCase

    CaseInstanceQuery caseInstanceNameLikeIgnoreCase(String caseInstanceNameLikeIgnoreCase)

  - ### caseInstanceRootScopeId

    CaseInstanceQuery caseInstanceRootScopeId(String rootScopeId)

  - ### caseInstanceParentScopeId

    CaseInstanceQuery caseInstanceParentScopeId(String parentScopeId)

  - ### caseInstanceBusinessKey

    CaseInstanceQuery caseInstanceBusinessKey(String caseInstanceBusinessKey)

  - ### caseInstanceBusinessKeyLike

    CaseInstanceQuery caseInstanceBusinessKeyLike(String caseInstanceBusinessKeyLike)

  - ### caseInstanceBusinessKeyLikeIgnoreCase

    CaseInstanceQuery caseInstanceBusinessKeyLikeIgnoreCase(String caseInstanceBusinessKeyLikeIgnoreCase)

  - ### caseInstanceBusinessStatus

    CaseInstanceQuery caseInstanceBusinessStatus(String caseInstanceBusinessStatus)

  - ### caseInstanceBusinessStatusLike

    CaseInstanceQuery caseInstanceBusinessStatusLike(String caseInstanceBusinessStatusLike)

  - ### caseInstanceBusinessStatusLikeIgnoreCase

    CaseInstanceQuery caseInstanceBusinessStatusLikeIgnoreCase(String caseInstanceBusinessStatusLikeIgnoreCase)

  - ### caseInstanceParentId

    CaseInstanceQuery caseInstanceParentId(String parentId)

  - ### caseInstanceStartedBefore

    CaseInstanceQuery caseInstanceStartedBefore(Date beforeTime)

  - ### caseInstanceStartedAfter

    CaseInstanceQuery caseInstanceStartedAfter(Date afterTime)

  - ### caseInstanceStartedBy

    CaseInstanceQuery caseInstanceStartedBy(String userId)

  - ### caseInstanceState

    CaseInstanceQuery caseInstanceState(String state)

  - ### caseInstanceLastReactivatedBefore

    CaseInstanceQuery caseInstanceLastReactivatedBefore(Date beforeTime)

  - ### caseInstanceLastReactivatedAfter

    CaseInstanceQuery caseInstanceLastReactivatedAfter(Date afterTime)

  - ### caseInstanceLastReactivatedBy

    CaseInstanceQuery caseInstanceLastReactivatedBy(String userId)

  - ### caseInstanceCallbackId

    CaseInstanceQuery caseInstanceCallbackId(String callbackId)

  - ### caseInstanceCallbackType

    CaseInstanceQuery caseInstanceCallbackType(String callbackType)

  - ### parentCaseInstanceId

    CaseInstanceQuery parentCaseInstanceId(String parentCaseInstanceId)

  - ### caseInstanceReferenceId

    CaseInstanceQuery caseInstanceReferenceId(String referenceId)

  - ### caseInstanceReferenceType

    CaseInstanceQuery caseInstanceReferenceType(String referenceType)

  - ### caseInstanceIsCompleteable

    CaseInstanceQuery caseInstanceIsCompleteable()

  - ### caseInstanceTenantId

    CaseInstanceQuery caseInstanceTenantId(String tenantId)

  - ### caseInstanceTenantIdLike

    CaseInstanceQuery caseInstanceTenantIdLike(String tenantIdLike)

  - ### caseInstanceTenantIdLikeIgnoreCase

    CaseInstanceQuery caseInstanceTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase)

  - ### caseInstanceWithoutTenantId

    CaseInstanceQuery caseInstanceWithoutTenantId()

  - ### activePlanItemDefinitionId

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

  - ### activePlanItemDefinitionIds

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

  - ### involvedUser

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

  - ### involvedUser

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

  - ### involvedGroup

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

  - ### involvedGroups

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

  - ### variableValueEquals

    CaseInstanceQuery variableValueEquals(String name, Object value)
    Only select case instances which have a global variable with the given value. The type of variable is determined based on the value. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - name of the variable, cannot be null.

  - ### variableValueEquals

    CaseInstanceQuery variableValueEquals(Object value)
    Only select case instances which have at least one global variable with the given value. The type of variable is determined based on the value. Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.

  - ### variableValueEqualsIgnoreCase

    CaseInstanceQuery variableValueEqualsIgnoreCase(String name, String value)
    Only select case instances which have a local string variable with the given value, case insensitive.

    This method only works if your database has encoding/collation that supports case-sensitive queries. For example, use "collate UTF-8" on MySQL and for MSSQL, select one of the case-sensitive Collations available (MSDN Server Collation Reference).

    Parameters:
      `name` - name of the variable, cannot be null.
      `value` - value of the variable, cannot be null.

  - ### variableValueNotEquals

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

  - ### variableValueNotEqualsIgnoreCase

    CaseInstanceQuery variableValueNotEqualsIgnoreCase(String name, String value)
    Only select case instances which have a local string variable which is not the given value, case insensitive.

    This method only works if your database has encoding/collation that supports case-sensitive queries. For example, use "collate UTF-8" on MySQL and for MSSQL, select one of the case-sensitive Collations available (MSDN Server Collation Reference).

    Parameters:
      `name` - name of the variable, cannot be null.
      `value` - value of the variable, cannot be null.

  - ### variableValueGreaterThan

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

  - ### variableValueGreaterThanOrEqual

    CaseInstanceQuery variableValueGreaterThanOrEqual(String name, Object value)
    Only select case instances which have a global variable value greater than or equal to the passed value. Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - variable name, cannot be null.
      `value` - variable value, cannot be null.

  - ### variableValueLessThan

    CaseInstanceQuery variableValueLessThan(String name, Object value)
    Only select case instances which have a global variable value less than the passed value. Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - variable name, cannot be null.
      `value` - variable value, cannot be null.

  - ### variableValueLessThanOrEqual

    CaseInstanceQuery variableValueLessThanOrEqual(String name, Object value)
    Only select case instances which have a global variable value less than or equal to the passed value. Booleans, Byte-arrays and `Serializable` objects (which are not primitive type wrappers) are not supported.
    Parameters:
      `name` - variable name, cannot be null.
      `value` - variable value, cannot be null.

  - ### variableValueLike

    CaseInstanceQuery variableValueLike(String name, String value)
    Only select case instances which have a global variable value like the given value. This be used on string variables only.
    Parameters:
      `name` - variable name, cannot be null.
      `value` - variable 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

    CaseInstanceQuery variableValueLikeIgnoreCase(String name, String value)
    Only select case instances which have a global variable value like the given value (case insensitive). This be used on string variables only.
    Parameters:
      `name` - variable name, cannot be null.
      `value` - variable 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

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

  - ### variableNotExists

    CaseInstanceQuery variableNotExists(String name)
    Only select case instances which don't have a variable with the given name.
    Parameters:
      `name` - cannot be null.

  - ### includeCaseVariables

    CaseInstanceQuery includeCaseVariables()
    Includes case variables into the query result.
    Returns:
      caseInstanceQuery with the flag to retrieve case variables into the response.

  - ### includeCaseVariables

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

  - ### or

    CaseInstanceQuery or()
    Begin an OR statement. Make sure you invoke the endOr method at the end of your OR statement.

  - ### endOr

    CaseInstanceQuery endOr()
    End an OR statement.

  - ### locale

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

  - ### withLocalizationFallback

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

  - ### orderByCaseInstanceId

    CaseInstanceQuery orderByCaseInstanceId()

  - ### orderByCaseDefinitionKey

    CaseInstanceQuery orderByCaseDefinitionKey()

  - ### orderByCaseDefinitionId

    CaseInstanceQuery orderByCaseDefinitionId()

  - ### orderByStartTime

    CaseInstanceQuery orderByStartTime()

  - ### orderByTenantId

    CaseInstanceQuery orderByTenantId()