Package org.activiti.engine.runtime
Interface ProcessInstanceQuery
-
- All Superinterfaces:
Query<ProcessInstanceQuery,ProcessInstance>
- All Known Implementing Classes:
ProcessInstanceQueryImpl
@Internal public interface ProcessInstanceQuery extends Query<ProcessInstanceQuery,ProcessInstance>
Allows programmatic querying ofProcessInstances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProcessInstanceQueryactive()Only select process instances which are active, which means that neither the process instance nor the corresponding process definition are suspended.ProcessInstanceQuerydeploymentId(java.lang.String deploymentId)Select the process instances which are defined by a deployment with the given id.ProcessInstanceQuerydeploymentIdIn(java.util.List<java.lang.String> deploymentIds)Select the process instances which are defined by one of the given deployment idsProcessInstanceQueryendOr()End an OR statement.ProcessInstanceQueryexcludeSubprocesses(boolean excludeSubprocesses)Exclude sub processes from the query result;ProcessInstanceQueryincludeProcessVariables()Include process variables in the process query resultProcessInstanceQueryinvolvedUser(java.lang.String userId)Select the process instances with which the user with the given id is involved.ProcessInstanceQuerylimitProcessInstanceVariables(java.lang.Integer processInstanceVariablesLimit)Limit process instance variablesProcessInstanceQuerylocale(java.lang.String locale)Localize process name and description to specified locale.ProcessInstanceQueryor()Begin an OR statement.ProcessInstanceQueryorderByProcessDefinitionId()Order by process definition id (needs to be followed byQuery.asc()orQuery.desc()).ProcessInstanceQueryorderByProcessDefinitionKey()Order by process definition key (needs to be followed byQuery.asc()orQuery.desc()).ProcessInstanceQueryorderByProcessInstanceId()Order by id (needs to be followed byQuery.asc()orQuery.desc()).ProcessInstanceQueryorderByTenantId()Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).ProcessInstanceQueryprocessDefinitionCategory(java.lang.String processDefinitionCategory)Only select process instances whose process definition category is processDefinitionCategory.ProcessInstanceQueryprocessDefinitionId(java.lang.String processDefinitionId)Select the process instances which are defined by a process definition with the given id.ProcessInstanceQueryprocessDefinitionIds(java.util.Set<java.lang.String> processDefinitionIds)Select the process instances which are defined by process definitions with the given ids.ProcessInstanceQueryprocessDefinitionKey(java.lang.String processDefinitionKey)Select the process instances which are defined by a process definition with the given key.ProcessInstanceQueryprocessDefinitionKeys(java.util.Set<java.lang.String> processDefinitionKeys)Select the process instances which are defined by process definitions with the given keys.ProcessInstanceQueryprocessDefinitionName(java.lang.String processDefinitionName)Select process instances whose process definition name is processDefinitionNameProcessInstanceQueryprocessDefinitionVersion(java.lang.Integer processDefinitionVersion)Only select process instances with a certain process definition version.ProcessInstanceQueryprocessInstanceBusinessKey(java.lang.String processInstanceBusinessKey)Select process instances with the given business keyProcessInstanceQueryprocessInstanceBusinessKey(java.lang.String processInstanceBusinessKey, java.lang.String processDefinitionKey)Select process instance with the given business key, unique for the given process definitionProcessInstanceQueryprocessInstanceId(java.lang.String processInstanceId)Select the process instance with the given idProcessInstanceQueryprocessInstanceIds(java.util.Set<java.lang.String> processInstanceIds)Select process instances whose id is in the given set of idsProcessInstanceQueryprocessInstanceName(java.lang.String name)Only select process instances with the given name.ProcessInstanceQueryprocessInstanceNameLike(java.lang.String nameLike)Only select process instances with a name like the given value.ProcessInstanceQueryprocessInstanceNameLikeIgnoreCase(java.lang.String nameLikeIgnoreCase)Only select process instances with a name like the given value, ignoring upper/lower case.ProcessInstanceQueryprocessInstanceTenantId(java.lang.String tenantId)Only select process instances that have the given tenant id.ProcessInstanceQueryprocessInstanceTenantIdLike(java.lang.String tenantIdLike)Only select process instances with a tenant id like the given one.ProcessInstanceQueryprocessInstanceWithoutTenantId()Only select process instances that do not have a tenant id.ProcessInstanceQuerystartedAfter(java.util.Date afterTime)Only select process instances started after the given timeProcessInstanceQuerystartedBefore(java.util.Date beforeTime)Only select process instances started before the given timeProcessInstanceQuerystartedBy(java.lang.String userId)Only select process instances started by the given user idProcessInstanceQuerysubProcessInstanceId(java.lang.String subProcessInstanceId)Select the process instance that have as sub process instance the given process instance.ProcessInstanceQuerysuperProcessInstanceId(java.lang.String superProcessInstanceId)Select the process instances which are a sub process instance of the given super process instance.ProcessInstanceQuerysuspended()Only select process instances which are suspended, either because the process instance itself is suspended or because the corresponding process definition is suspendedProcessInstanceQueryvariableValueEquals(java.lang.Object value)Only select process instances which have at least one global variable with the given value.ProcessInstanceQueryvariableValueEquals(java.lang.String name, java.lang.Object value)Only select process instances which have a global variable with the given value.ProcessInstanceQueryvariableValueEqualsIgnoreCase(java.lang.String name, java.lang.String value)Only select process instances which have a local string variable with the given value, case insensitive.ProcessInstanceQueryvariableValueGreaterThan(java.lang.String name, java.lang.Object value)Only select process instances which have a variable value greater than the passed value.ProcessInstanceQueryvariableValueGreaterThanOrEqual(java.lang.String name, java.lang.Object value)Only select process instances which have a global variable value greater than or equal to the passed value.ProcessInstanceQueryvariableValueLessThan(java.lang.String name, java.lang.Object value)Only select process instances which have a global variable value less than the passed value.ProcessInstanceQueryvariableValueLessThanOrEqual(java.lang.String name, java.lang.Object value)Only select process instances which have a global variable value less than or equal to the passed value.ProcessInstanceQueryvariableValueLike(java.lang.String name, java.lang.String value)Only select process instances which have a global variable value like the given value.ProcessInstanceQueryvariableValueLikeIgnoreCase(java.lang.String name, java.lang.String value)Only select process instances which have a global variable value like the given value (case insensitive).ProcessInstanceQueryvariableValueNotEquals(java.lang.String name, java.lang.Object value)Only select process instances which have a global variable with the given name, but with a different value than the passed value.ProcessInstanceQueryvariableValueNotEqualsIgnoreCase(java.lang.String name, java.lang.String value)Only select process instances which have a local string variable which is not the given value, case insensitive.ProcessInstanceQuerywithJobException()Only select process instances that failed due to an exception happening during a job execution.ProcessInstanceQuerywithLocalizationFallback()Instruct localization to fallback to more general locales including the default locale of the JVM if the specified locale is not found.
-
-
-
Method Detail
-
processInstanceId
ProcessInstanceQuery processInstanceId(java.lang.String processInstanceId)
Select the process instance with the given id
-
processInstanceIds
ProcessInstanceQuery processInstanceIds(java.util.Set<java.lang.String> processInstanceIds)
Select process instances whose id is in the given set of ids
-
processInstanceBusinessKey
ProcessInstanceQuery processInstanceBusinessKey(java.lang.String processInstanceBusinessKey)
Select process instances with the given business key
-
processInstanceBusinessKey
ProcessInstanceQuery processInstanceBusinessKey(java.lang.String processInstanceBusinessKey, java.lang.String processDefinitionKey)
Select process instance with the given business key, unique for the given process definition
-
processInstanceTenantId
ProcessInstanceQuery processInstanceTenantId(java.lang.String tenantId)
Only select process instances that have the given tenant id.
-
processInstanceTenantIdLike
ProcessInstanceQuery processInstanceTenantIdLike(java.lang.String tenantIdLike)
Only select process instances with a tenant id like the given one.
-
processInstanceWithoutTenantId
ProcessInstanceQuery processInstanceWithoutTenantId()
Only select process instances that do not have a tenant id.
-
processDefinitionCategory
ProcessInstanceQuery processDefinitionCategory(java.lang.String processDefinitionCategory)
Only select process instances whose process definition category is processDefinitionCategory.
-
processDefinitionName
ProcessInstanceQuery processDefinitionName(java.lang.String processDefinitionName)
Select process instances whose process definition name is processDefinitionName
-
processDefinitionVersion
ProcessInstanceQuery processDefinitionVersion(java.lang.Integer processDefinitionVersion)
Only select process instances with a certain process definition version. Particulary useful when used in combination withprocessDefinitionKey(String)
-
processDefinitionKey
ProcessInstanceQuery processDefinitionKey(java.lang.String processDefinitionKey)
Select the process instances which are defined by a process definition with the given key.
-
processDefinitionKeys
ProcessInstanceQuery processDefinitionKeys(java.util.Set<java.lang.String> processDefinitionKeys)
Select the process instances which are defined by process definitions with the given keys.
-
processDefinitionId
ProcessInstanceQuery processDefinitionId(java.lang.String processDefinitionId)
Select the process instances which are defined by a process definition with the given id.
-
processDefinitionIds
ProcessInstanceQuery processDefinitionIds(java.util.Set<java.lang.String> processDefinitionIds)
Select the process instances which are defined by process definitions with the given ids.
-
deploymentId
ProcessInstanceQuery deploymentId(java.lang.String deploymentId)
Select the process instances which are defined by a deployment with the given id.
-
deploymentIdIn
ProcessInstanceQuery deploymentIdIn(java.util.List<java.lang.String> deploymentIds)
Select the process instances which are defined by one of the given deployment ids
-
superProcessInstanceId
ProcessInstanceQuery superProcessInstanceId(java.lang.String superProcessInstanceId)
Select the process instances which are a sub process instance of the given super process instance.
-
subProcessInstanceId
ProcessInstanceQuery subProcessInstanceId(java.lang.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;
-
involvedUser
ProcessInstanceQuery involvedUser(java.lang.String userId)
Select the process instances with which the user with the given id is involved.
-
variableValueEquals
ProcessInstanceQuery variableValueEquals(java.lang.String name, java.lang.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 inProcessEngineConfiguration#getVariableTypes(). Byte-arrays andSerializableobjects (which are not primitive type wrappers) are not supported.- Parameters:
name- name of the variable, cannot be null.
-
variableValueEquals
ProcessInstanceQuery variableValueEquals(java.lang.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 inProcessEngineConfiguration#getVariableTypes(). Byte-arrays andSerializableobjects (which are not primitive type wrappers) are not supported.
-
variableValueEqualsIgnoreCase
ProcessInstanceQuery variableValueEqualsIgnoreCase(java.lang.String name, java.lang.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(java.lang.String name, java.lang.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 andSerializableobjects (which are not primitive type wrappers) are not supported.- Parameters:
name- name of the variable, cannot be null.
-
variableValueNotEqualsIgnoreCase
ProcessInstanceQuery variableValueNotEqualsIgnoreCase(java.lang.String name, java.lang.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(java.lang.String name, java.lang.Object value)
Only select process instances which have a variable value greater than the passed value. Booleans, Byte-arrays andSerializableobjects (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(java.lang.String name, java.lang.Object value)
Only select process instances which have a global variable value greater than or equal to the passed value. Booleans, Byte-arrays andSerializableobjects (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(java.lang.String name, java.lang.Object value)
Only select process instances which have a global variable value less than the passed value. Booleans, Byte-arrays andSerializableobjects (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(java.lang.String name, java.lang.Object value)
Only select process instances which have a global variable value less than or equal to the passed value. Booleans, Byte-arrays andSerializableobjects (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(java.lang.String name, java.lang.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(java.lang.String name, java.lang.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%).
-
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(java.lang.String name)
Only select process instances with the given name.
-
processInstanceNameLike
ProcessInstanceQuery processInstanceNameLike(java.lang.String nameLike)
Only select process instances with a name like the given value.
-
processInstanceNameLikeIgnoreCase
ProcessInstanceQuery processInstanceNameLikeIgnoreCase(java.lang.String nameLikeIgnoreCase)
Only select process instances with a name like the given value, ignoring upper/lower case.
-
locale
ProcessInstanceQuery locale(java.lang.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
-
limitProcessInstanceVariables
ProcessInstanceQuery limitProcessInstanceVariables(java.lang.Integer processInstanceVariablesLimit)
Limit process instance variables
-
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(java.util.Date beforeTime)
Only select process instances started before the given time
-
startedAfter
ProcessInstanceQuery startedAfter(java.util.Date afterTime)
Only select process instances started after the given time
-
startedBy
ProcessInstanceQuery startedBy(java.lang.String userId)
Only select process instances started by the given user id
-
orderByProcessInstanceId
ProcessInstanceQuery orderByProcessInstanceId()
Order by id (needs to be followed byQuery.asc()orQuery.desc()).
-
orderByProcessDefinitionKey
ProcessInstanceQuery orderByProcessDefinitionKey()
Order by process definition key (needs to be followed byQuery.asc()orQuery.desc()).
-
orderByProcessDefinitionId
ProcessInstanceQuery orderByProcessDefinitionId()
Order by process definition id (needs to be followed byQuery.asc()orQuery.desc()).
-
orderByTenantId
ProcessInstanceQuery orderByTenantId()
Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).
-
-