Package org.flowable.engine.runtime

# Interface ProcessInstanceQuery

All Superinterfaces:
  `Query<ProcessInstanceQuery,ProcessInstance>`

public interface ProcessInstanceQuery extends Query<ProcessInstanceQuery,ProcessInstance>
Allows programmatic querying of `ProcessInstance`s.

Author:
  Joram Barrez, Tijs Rademakers, Frederik Heremans, 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
  `ProcessInstanceQuery`
  `active()`
  Only select process instances which are active, which means that neither the process instance nor the corresponding process definition are suspended.
  `ProcessInstanceQuery`
  `activeActivityId(String activityId)`
  Select the process instances which have an active activity instance like the provided id.
  `ProcessInstanceQuery`
  `activeActivityIds(Set<String> activityIds)`
  Select the process instances which have an active activity instance like the provided ids.
  `ProcessInstanceQuery`
  `deploymentId(String deploymentId)`
  Select the process instances which are defined by a deployment with the given id.
  `ProcessInstanceQuery`
  `deploymentIdIn(List<String> deploymentIds)`
  Select the process instances which are defined by one of the given deployment ids
  `ProcessInstanceQuery`
  `endOr()`
  End an OR statement.
  `ProcessInstanceQuery`
  `excludeProcessDefinitionKeys(Set<String> processDefinitionKeys)`
  Select the process instances which are defined by process definitions that don't match the given keys.
  `ProcessInstanceQuery`
  `excludeSubprocesses(boolean excludeSubprocesses)`
  Exclude sub processes from the query result;
  `ProcessInstanceQuery`
  `includeProcessVariables()`
  Include process variables in the process query result
  `ProcessInstanceQuery`
  `includeProcessVariables(Collection<String> variableNames)`
  Include the process variables with the given names into the query result.
  `ProcessInstanceQuery`
  `involvedGroup(String groupId, String identityLinkType)`
  Select the process instances with which the group with the given id and identity link type is involved.
  `ProcessInstanceQuery`
  `involvedGroups(Set<String> groupIds)`
  Select the process instances with which the `Group`s with the given ids are involved.
  `ProcessInstanceQuery`
  `involvedUser(String userId)`
  Select the process instances with which the user with the given id is involved.
  `ProcessInstanceQuery`
  `involvedUser(String userId, String identityLinkType)`
  Select the process instances with which the user with the given id and identity link type is involved.
  `ProcessInstanceQuery`
  `locale(String locale)`
  Localize process name and description to specified locale.
  `ProcessInstanceQuery`
  `or()`
  Begin an OR statement.
  `ProcessInstanceQuery`
  `orderByProcessDefinitionId()`
  Order by process definition id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessInstanceQuery`
  `orderByProcessDefinitionKey()`
  Order by process definition key (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessInstanceQuery`
  `orderByProcessInstanceId()`
  Order by id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessInstanceQuery`
  `orderByStartTime()`
  Order by start time (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessInstanceQuery`
  `orderByTenantId()`
  Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessInstanceQuery`
  `parentCaseInstanceId(String parentCaseInstanceId)`
  Only select process instances that are a sub process of the provided case instance id.
  `ProcessInstanceQuery`
  `processDefinitionCategory(String processDefinitionCategory)`
  Only select process instances whose process definition category is processDefinitionCategory.
  `ProcessInstanceQuery`
  `processDefinitionCategoryLike(String processDefinitionCategoryLike)`
  Only select process instances whose process definition category is like the given value.
  `ProcessInstanceQuery`
  `processDefinitionCategoryLikeIgnoreCase(String processDefinitionCategoryLikeIgnoreCase)`
  Only select process instances whose process definition category is like the given value, ignoring upper/lower case.
  `ProcessInstanceQuery`
  `processDefinitionEngineVersion(String processDefinitionEngineVersion)`
  Select the process instances which are defined by a process definition with the given engine version.
  `ProcessInstanceQuery`
  `processDefinitionId(String processDefinitionId)`
  Select the process instances which are defined by a process definition with the given id.
  `ProcessInstanceQuery`
  `processDefinitionIds(Set<String> processDefinitionIds)`
  Select the process instances which are defined by process definitions with the given ids.
  `ProcessInstanceQuery`
  `processDefinitionKey(String processDefinitionKey)`
  Select the process instances which are defined by a process definition with the given key.
  `ProcessInstanceQuery`
  `processDefinitionKeyLike(String processDefinitionKeyLike)`
  Select process instances whose process definition key is like the given value
  `ProcessInstanceQuery`
  `processDefinitionKeyLikeIgnoreCase(String processDefinitionKeyLikeIgnoreCase)`
  Select process instances whose process definition key is like the given value, ignoring upper/lower case.
  `ProcessInstanceQuery`
  `processDefinitionKeys(Set<String> processDefinitionKeys)`
  Select the process instances which are defined by process definitions with the given keys.
  `ProcessInstanceQuery`
  `processDefinitionName(String processDefinitionName)`
  Select process instances whose process definition name is processDefinitionName
  `ProcessInstanceQuery`
  `processDefinitionNameLike(String processDefinitionNameLike)`
  Select process instances whose process definition name is like the given value
  `ProcessInstanceQuery`
  `processDefinitionNameLikeIgnoreCase(String processDefinitionNameLikeIgnoreCase)`
  Select process instances whose process definition name is like the given value, ignoring upper/lower case.
  `ProcessInstanceQuery`
  `processDefinitionVersion(Integer processDefinitionVersion)`
  Only select process instances with a certain process definition version.
  `ProcessInstanceQuery`
  `processInstanceBusinessKey(String processInstanceBusinessKey)`
  Select process instances with the given business key
  `ProcessInstanceQuery`
  `processInstanceBusinessKey(String processInstanceBusinessKey, String processDefinitionKey)`
  Select process instance with the given business key, unique for the given process definition
  `ProcessInstanceQuery`
  `processInstanceBusinessKeyLike(String businessKeyLike)`
  Select process instances with a business key like the given value.
  `ProcessInstanceQuery`
  `processInstanceBusinessKeyLikeIgnoreCase(String businessKeyLikeIgnoreCase)`
  Select process instances with a business key like the given value, ignoring upper/lower case.
  `ProcessInstanceQuery`
  `processInstanceBusinessStatus(String businessStatus)`
  Select process instances with the given business status
  `ProcessInstanceQuery`
  `processInstanceBusinessStatusLike(String businessStatusLike)`
  Select process instances with a business status like the given value.
  `ProcessInstanceQuery`
  `processInstanceBusinessStatusLikeIgnoreCase(String businessStatusLikeIgnoreCase)`
  Select process instances with a business status like the given value, ignoring upper/lower case.
  `ProcessInstanceQuery`
  `processInstanceCallbackId(String callbackId)`
  Only select process instances with the given callback id.
  `ProcessInstanceQuery`
  `processInstanceCallbackType(String callbackType)`
  Only select process instances with the given callback type.
  `ProcessInstanceQuery`
  `processInstanceId(String processInstanceId)`
  Select the process instance with the given id
  `ProcessInstanceQuery`
  `processInstanceIds(Set<String> processInstanceIds)`
  Select process instances whose id is in the given set of ids
  `ProcessInstanceQuery`
  `processInstanceName(String name)`
  Only select process instances with the given name.
  `ProcessInstanceQuery`
  `processInstanceNameLike(String nameLike)`
  Only select process instances with a name like the given value.
  `ProcessInstanceQuery`
  `processInstanceNameLikeIgnoreCase(String nameLikeIgnoreCase)`
  Only select process instances with a name like the given value, ignoring upper/lower case.
  `ProcessInstanceQuery`
  `processInstanceParentScopeId(String parentScopeId)`
  Only select process instances with the given parent process instance id.
  `ProcessInstanceQuery`
  `processInstanceReferenceId(String referenceId)`
  Only select process instances with the given reference id.
  `ProcessInstanceQuery`
  `processInstanceReferenceType(String referenceType)`
  Only select process instances with the given callback type.
  `ProcessInstanceQuery`
  `processInstanceRootScopeId(String rootScopeId)`
  Only select process instances with a root instance with a name like the given value.
  `ProcessInstanceQuery`
  `processInstanceTenantId(String tenantId)`
  Only select process instances that have the given tenant id.
  `ProcessInstanceQuery`
  `processInstanceTenantIdLike(String tenantIdLike)`
  Only select process instances with a tenant id like the given one.
  `ProcessInstanceQuery`
  `processInstanceTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase)`
  Only select process instances with a tenant id like the given one, ignoring upper/lower case.
  `ProcessInstanceQuery`
  `processInstanceWithoutTenantId()`
  Only select process instances that do not have a tenant id.
  `ProcessInstanceQuery`
  `startedAfter(Date afterTime)`
  Only select process instances started after the given time
  `ProcessInstanceQuery`
  `startedBefore(Date beforeTime)`
  Only select process instances started before the given time
  `ProcessInstanceQuery`
  `startedBy(String userId)`
  Only select process instances started by the given user id
  `ProcessInstanceQuery`
  `subProcessInstanceId(String subProcessInstanceId)`
  Select the process instance that have as sub process instance the given process instance.
  `ProcessInstanceQuery`
  `superProcessInstanceId(String superProcessInstanceId)`
  Select the process instances which are a sub process instance of the given super process instance.
  `ProcessInstanceQuery`
  `suspended()`
  Only select process instances which are suspended, either because the process instance itself is suspended or because the corresponding process definition is suspended
  `ProcessInstanceQuery`
  `variableExists(String name)`
  Only select process instances which have a variable with the given name.
  `ProcessInstanceQuery`
  `variableNotExists(String name)`
  Only select process instances which does not have a variable with the given name.
  `ProcessInstanceQuery`
  `variableValueEquals(Object value)`
  Only select process instances which have at least one global variable with the given value.
  `ProcessInstanceQuery`
  `variableValueEquals(String name, Object value)`
  Only select process instances which have a global variable with the given value.
  `ProcessInstanceQuery`
  `variableValueEqualsIgnoreCase(String name, String value)`
  Only select process instances which have a local string variable with the given value, case insensitive.
  `ProcessInstanceQuery`
  `variableValueGreaterThan(String name, Object value)`
  Only select process instances which have a variable value greater than the passed value.
  `ProcessInstanceQuery`
  `variableValueGreaterThanOrEqual(String name, Object value)`
  Only select process instances which have a global variable value greater than or equal to the passed value.
  `ProcessInstanceQuery`
  `variableValueLessThan(String name, Object value)`
  Only select process instances which have a global variable value less than the passed value.
  `ProcessInstanceQuery`
  `variableValueLessThanOrEqual(String name, Object value)`
  Only select process instances which have a global variable value less than or equal to the passed value.
  `ProcessInstanceQuery`
  `variableValueLike(String name, String value)`
  Only select process instances which have a global variable value like the given value.
  `ProcessInstanceQuery`
  `variableValueLikeIgnoreCase(String name, String value)`
  Only select process instances which have a global variable value like the given value (case insensitive).
  `ProcessInstanceQuery`
  `variableValueNotEquals(String name, Object value)`
  Only select process instances which have a global variable with the given name, but with a different value than the passed value.
  `ProcessInstanceQuery`
  `variableValueNotEqualsIgnoreCase(String name, String value)`
  Only select process instances which have a local string variable which is not the given value, case insensitive.
  `ProcessInstanceQuery`
  `withJobException()`
  Only select process instances that failed due to an exception happening during a job execution.
  `ProcessInstanceQuery`
  `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

  - ### processInstanceId

    ProcessInstanceQuery processInstanceId(String processInstanceId)
    Select the process instance with the given id

  - ### processInstanceIds

    ProcessInstanceQuery processInstanceIds(Set<String> processInstanceIds)
    Select process instances whose id is in the given set of ids

  - ### processInstanceBusinessKey

    ProcessInstanceQuery processInstanceBusinessKey(String processInstanceBusinessKey)
    Select process instances with the given business key

  - ### processInstanceBusinessKey

    ProcessInstanceQuery processInstanceBusinessKey(String processInstanceBusinessKey, String processDefinitionKey)
    Select process instance with the given business key, unique for the given process definition

  - ### processInstanceBusinessKeyLike

    ProcessInstanceQuery processInstanceBusinessKeyLike(String businessKeyLike)
    Select process instances with a business key like the given value.

  - ### processInstanceBusinessKeyLikeIgnoreCase

    ProcessInstanceQuery processInstanceBusinessKeyLikeIgnoreCase(String businessKeyLikeIgnoreCase)
    Select process instances with a business key like the given value, ignoring upper/lower case.

  - ### processInstanceBusinessStatus

    ProcessInstanceQuery processInstanceBusinessStatus(String businessStatus)
    Select process instances with the given business status

  - ### processInstanceBusinessStatusLike

    ProcessInstanceQuery processInstanceBusinessStatusLike(String businessStatusLike)
    Select process instances with a business status like the given value.

  - ### processInstanceBusinessStatusLikeIgnoreCase

    ProcessInstanceQuery processInstanceBusinessStatusLikeIgnoreCase(String businessStatusLikeIgnoreCase)
    Select process instances with a business status like the given value, ignoring upper/lower case.

  - ### processInstanceTenantId

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

  - ### processInstanceTenantIdLike

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

  - ### processInstanceTenantIdLikeIgnoreCase

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

  - ### processInstanceWithoutTenantId

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

  - ### processDefinitionCategory

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

  - ### processDefinitionCategoryLike

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

  - ### processDefinitionCategoryLikeIgnoreCase

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

  - ### processDefinitionName

    ProcessInstanceQuery processDefinitionName(String processDefinitionName)
    Select process instances whose process definition name is processDefinitionName

  - ### processDefinitionNameLike

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

  - ### processDefinitionNameLikeIgnoreCase

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

  - ### processDefinitionVersion

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

  - ### processDefinitionKey

    ProcessInstanceQuery processDefinitionKey(String processDefinitionKey)
    Select the process instances which are defined by a process definition with the given key.

  - ### processDefinitionKeys

    ProcessInstanceQuery processDefinitionKeys(Set<String> processDefinitionKeys)
    Select the process instances which are defined by process definitions with the given keys.

  - ### excludeProcessDefinitionKeys

    ProcessInstanceQuery excludeProcessDefinitionKeys(Set<String> processDefinitionKeys)
    Select the process instances which are defined by process definitions that don't match the given keys.

  - ### processDefinitionKeyLike

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

  - ### processDefinitionKeyLikeIgnoreCase

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

  - ### processDefinitionId

    ProcessInstanceQuery processDefinitionId(String processDefinitionId)
    Select the process instances which are defined by a process definition with the given id.

  - ### processDefinitionIds

    ProcessInstanceQuery processDefinitionIds(Set<String> processDefinitionIds)
    Select the process instances which are defined by process definitions with the given ids.

  - ### processDefinitionEngineVersion

    ProcessInstanceQuery processDefinitionEngineVersion(String processDefinitionEngineVersion)
    Select the process instances which are defined by a process definition with the given engine version.

  - ### deploymentId

    ProcessInstanceQuery deploymentId(String deploymentId)
    Select the process instances which are defined by a deployment with the given id.

  - ### deploymentIdIn

    ProcessInstanceQuery deploymentIdIn(List<String> deploymentIds)
    Select the process instances which are defined by one of the given deployment ids

  - ### superProcessInstanceId

    ProcessInstanceQuery superProcessInstanceId(String superProcessInstanceId)
    Select the process instances which are a sub process instance of the given super process instance.

  - ### subProcessInstanceId

    ProcessInstanceQuery subProcessInstanceId(String subProcessInstanceId)
    Select the process instance that have as sub process instance the given process instance. Note that there will always be maximum only one such process instance that can be the result of this query.

  - ### excludeSubprocesses

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

  - ### activeActivityId

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

  - ### activeActivityIds

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

  - ### involvedUser

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

  - ### involvedUser

    ProcessInstanceQuery involvedUser(String userId, String identityLinkType)
    Select the process instances with which the user with the given id and identity link type is involved.

  - ### involvedGroup

    ProcessInstanceQuery involvedGroup(String groupId, String identityLinkType)
    Select the process instances with which the group with the given id and identity link type is involved.

  - ### involvedGroups

    ProcessInstanceQuery involvedGroups(Set<String> groupIds)
    Select the process instances with which the `Group`s with the given ids are involved.

  - ### variableValueEquals

    ProcessInstanceQuery variableValueEquals(String name, Object value)
    Only select process instances which have a global variable with the given value. The type of variable 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` - name of the variable, cannot be null.

  - ### variableValueEquals

    ProcessInstanceQuery variableValueEquals(Object value)
    Only select process instances which have at least one global variable with the given value. The type of variable 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

    ProcessInstanceQuery variableValueEqualsIgnoreCase(String name, String value)
    Only select process 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

    ProcessInstanceQuery variableValueNotEquals(String name, Object value)
    Only select process 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

    ProcessInstanceQuery variableValueNotEqualsIgnoreCase(String name, String value)
    Only select process 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

    ProcessInstanceQuery variableValueGreaterThan(String name, Object value)
    Only select process 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

    ProcessInstanceQuery variableValueGreaterThanOrEqual(String name, Object value)
    Only select process 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

    ProcessInstanceQuery variableValueLessThan(String name, Object value)
    Only select process 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

    ProcessInstanceQuery variableValueLessThanOrEqual(String name, Object value)
    Only select process 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

    ProcessInstanceQuery variableValueLike(String name, String value)
    Only select process 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

    ProcessInstanceQuery variableValueLikeIgnoreCase(String name, String value)
    Only select process 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

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

  - ### variableNotExists

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

  - ### suspended

    ProcessInstanceQuery suspended()
    Only select process instances which are suspended, either because the process instance itself is suspended or because the corresponding process definition is suspended

  - ### active

    ProcessInstanceQuery active()
    Only select process instances which are active, which means that neither the process instance nor the corresponding process definition are suspended.

  - ### processInstanceName

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

  - ### processInstanceNameLike

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

  - ### processInstanceNameLikeIgnoreCase

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

  - ### processInstanceRootScopeId

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

  - ### processInstanceParentScopeId

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

  - ### processInstanceCallbackId

    ProcessInstanceQuery processInstanceCallbackId(String callbackId)
    Only select process instances with the given callback id.

  - ### processInstanceCallbackType

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

  - ### parentCaseInstanceId

    ProcessInstanceQuery parentCaseInstanceId(String parentCaseInstanceId)
    Only select process instances that are a sub process of the provided case instance id.

  - ### processInstanceReferenceId

    ProcessInstanceQuery processInstanceReferenceId(String referenceId)
    Only select process instances with the given reference id.

  - ### processInstanceReferenceType

    ProcessInstanceQuery processInstanceReferenceType(String referenceType)
    Only select process instances with the given callback type.

  - ### locale

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

  - ### withLocalizationFallback

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

  - ### includeProcessVariables

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

  - ### includeProcessVariables

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

  - ### withJobException

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

  - ### or

    ProcessInstanceQuery 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

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

  - ### startedBefore

    ProcessInstanceQuery startedBefore(Date beforeTime)
    Only select process instances started before the given time

  - ### startedAfter

    ProcessInstanceQuery startedAfter(Date afterTime)
    Only select process instances started after the given time

  - ### startedBy

    ProcessInstanceQuery startedBy(String userId)
    Only select process instances started by the given user id

  - ### orderByProcessInstanceId

    ProcessInstanceQuery orderByProcessInstanceId()
    Order by id (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessDefinitionKey

    ProcessInstanceQuery orderByProcessDefinitionKey()
    Order by process definition key (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessDefinitionId

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

  - ### orderByStartTime

    ProcessInstanceQuery orderByStartTime()
    Order by start time (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByTenantId

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