# Uses of Interface
org.flowable.engine.runtime.ProcessInstanceQuery

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

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

  Methods in org.flowable.engine that return ProcessInstanceQuery
  Modifier and Type
  Method
  Description
  `ProcessInstanceQuery`
  RuntimeService.`createProcessInstanceQuery()`
  Creates a new `ProcessInstanceQuery` instance, that can be used to query process instances.

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

  Methods in org.flowable.engine.interceptor with parameters of type ProcessInstanceQuery
  Modifier and Type
  Method
  Description
  `void`
  ProcessInstanceQueryInterceptor.`afterProcessInstanceQueryExecute(ProcessInstanceQuery processInstanceQuery, List<ProcessInstance> processInstances)`
  `void`
  ProcessInstanceQueryInterceptor.`beforeProcessInstanceQueryExecute(ProcessInstanceQuery processInstanceQuery)`

- ## Uses of ProcessInstanceQuery in org.flowable.engine.runtime

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