Package org.activiti.engine.history
Interface HistoricProcessInstanceQuery
- All Superinterfaces:
Query<HistoricProcessInstanceQuery,HistoricProcessInstance>
- All Known Implementing Classes:
HistoricProcessInstanceQueryImpl
@Internal
public interface HistoricProcessInstanceQuery
extends Query<HistoricProcessInstanceQuery,HistoricProcessInstance>
Allows programmatic querying of
HistoricProcessInstances.-
Method Summary
Modifier and TypeMethodDescriptiondeleted()Only select historic process instances that are deleted.deploymentId(String deploymentId) Only select historic process instances that are defined by a process definition with the given deployment identifier.deploymentIdIn(List<String> deploymentIds) Only select historic process instances that are defined by a process definition with one of the given deployment identifiers.endOr()End an OR statement.excludeSubprocesses(boolean excludeSubprocesses) Exclude sub processes from the query result;finished()Only select historic process instances that are completely finished.finishedAfter(Date date) Only select historic process instances that were started after the given date.finishedBefore(Date date) Only select historic process instances that were started before the given date.Include process variables in the process query resultinvolvedGroupsIn(List<String> involvedGroups) Only select the historic process instances with which the given groups are involved.involvedUser(String userId) Only select the historic process instances with which the user with the given id is involved.limitProcessInstanceVariables(Integer processInstanceVariablesLimit) Limit process instance variablesLocalize historic process name and description to specified locale.Only select historic process instance that are not deleted.or()Begin an OR statement.Order by the process definition id (needs to be followed byQuery.asc()orQuery.desc()).Order by the business key (needs to be followed byQuery.asc()orQuery.desc()).Order by the duration of the process instance (needs to be followed byQuery.asc()orQuery.desc()).Order by the end time (needs to be followed byQuery.asc()orQuery.desc()).Order by the process instance id (needs to be followed byQuery.asc()orQuery.desc()).Order by the start time (needs to be followed byQuery.asc()orQuery.desc()).Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).processDefinitionCategory(String processDefinitionCategory) Only select historic process instances whose process definition category is processDefinitionCategory.processDefinitionId(String processDefinitionId) Only select historic process instances for the given process definitionprocessDefinitionKey(String processDefinitionKey) Only select historic process instances that are defined by a process definition with the given key.processDefinitionKeyIn(List<String> processDefinitionKeys) Only select historic process instances that are defined by a process definition with one of the given process definition keys.processDefinitionKeyNotIn(List<String> processDefinitionKeys) Only select historic process instances that don't have a process-definition of which the key is present in the given listprocessDefinitionName(String processDefinitionName) Select process historic instances whose process definition name is processDefinitionNameprocessDefinitionVersion(Integer processDefinitionVersion) Only select historic process instances with a certain process definition version.processInstanceBusinessKey(String processInstanceBusinessKey) Only select historic process instances with the given business keyprocessInstanceId(String processInstanceId) Only select historic process instances with the given process instance.processInstanceIds(Set<String> processInstanceIds) Only select historic process instances whose id is in the given set of ids.processInstanceName(String name) Only select process instances with the given name.processInstanceNameLike(String nameLike) Only select process instances with a name like the given value.processInstanceNameLikeIgnoreCase(String nameLikeIgnoreCase) Only select process instances with a name like the given value, ignoring upper/lower case.processInstanceTenantId(String tenantId) Only select process instances that have the given tenant id.processInstanceTenantIdLike(String tenantIdLike) Only select process instances with a tenant id like the given one.Only select process instances that do not have a tenant id.startedAfter(Date date) Only select historic process instances that were started after the given date.startedBefore(Date date) Only select historic process instances that were started before the given date.Only select historic process instance that are started by the given user.superProcessInstanceId(String superProcessInstanceId) Only select historic process instances started by the given process instance.Only select historic process instance that are not yet finished.variableValueEquals(Object value) Only select process instances which had at least one global variable with the given value when they ended.variableValueEquals(String name, Object value) Only select process instances which had a global variable with the given value when they ended.variableValueEqualsIgnoreCase(String name, String value) Only select historic process instances which have a local string variable with the given value, case insensitive.variableValueGreaterThan(String name, Object value) Only select process instances which had a global variable value greater than the passed value when they ended.variableValueGreaterThanOrEqual(String name, Object value) Only select process instances which had a global variable value greater than or equal to the passed value when they ended.variableValueLessThan(String name, Object value) Only select process instances which had a global variable value less than the passed value when the ended.variableValueLessThanOrEqual(String name, Object value) Only select process instances which has a global variable value less than or equal to the passed value when they ended.variableValueLike(String name, String value) Only select process instances which had global variable value like the given value when they ended.variableValueLikeIgnoreCase(String name, String value) Only select process instances which had global variable value like (case insensitive) the given value when they ended.variableValueNotEquals(String name, Object value) Only select process instances which had a global variable with the given name, but with a different value than the passed value when they ended.Only select process instances that failed due to an exception happening during a job execution.Instruct localization to fallback to more general locales including the default locale of the JVM if the specified locale is not found.
-
Method Details
-
processInstanceId
Only select historic process instances with the given process instance. {@link ProcessInstance) ids and {@link HistoricProcessInstance} ids match. -
processInstanceIds
Only select historic process instances whose id is in the given set of ids. {@link ProcessInstance) ids and {@link HistoricProcessInstance} ids match. -
processDefinitionId
Only select historic process instances for the given process definition -
processDefinitionKey
Only select historic process instances that are defined by a process definition with the given key. -
processDefinitionKeyIn
Only select historic process instances that are defined by a process definition with one of the given process definition keys. -
processDefinitionKeyNotIn
Only select historic process instances that don't have a process-definition of which the key is present in the given list -
processDefinitionCategory
Only select historic process instances whose process definition category is processDefinitionCategory. -
processDefinitionName
Select process historic instances whose process definition name is processDefinitionName -
processDefinitionVersion
Only select historic process instances with a certain process definition version. Particulary useful when used in combination withprocessDefinitionKey(String) -
processInstanceBusinessKey
Only select historic process instances with the given business key -
deploymentId
Only select historic process instances that are defined by a process definition with the given deployment identifier. -
deploymentIdIn
Only select historic process instances that are defined by a process definition with one of the given deployment identifiers. -
finished
HistoricProcessInstanceQuery finished()Only select historic process instances that are completely finished. -
unfinished
HistoricProcessInstanceQuery unfinished()Only select historic process instance that are not yet finished. -
deleted
HistoricProcessInstanceQuery deleted()Only select historic process instances that are deleted. -
notDeleted
HistoricProcessInstanceQuery notDeleted()Only select historic process instance that are not deleted. -
involvedUser
Only select the historic process instances with which the user with the given id is involved. -
variableValueEquals
Only select process instances which had a global variable with the given value when they ended. The type only applies to already ended process instances, otherwise use aProcessInstanceQueryinstead! 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- of the variable, cannot be null.
-
variableValueEquals
Only select process instances which had at least one global variable with the given value when they ended. The type only applies to already ended process instances, otherwise use aProcessInstanceQueryinstead! 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
Only select historic process instances which have a local 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
Only select process instances which had a global variable with the given name, but with a different value than the passed value when they ended. Only select process instances which have a variable value greater than the passed value. Byte-arrays andSerializableobjects (which are not primitive type wrappers) are not supported.- Parameters:
name- of the variable, cannot be null.
-
variableValueGreaterThan
Only select process instances which had a global variable value greater than the passed value when they ended. Booleans, Byte-arrays andSerializableobjects (which are not primitive type wrappers) are not supported. Only select process instances which have a variable value greater than the passed value.- Parameters:
name- cannot be null.value- cannot be null.
-
variableValueGreaterThanOrEqual
Only select process instances which had a global variable value greater than or equal to the passed value when they ended. Booleans, Byte-arrays andSerializableobjects (which are not primitive type wrappers) are not supported. Only applies to already ended process instances, otherwise use aProcessInstanceQueryinstead!- Parameters:
name- cannot be null.value- cannot be null.
-
variableValueLessThan
Only select process instances which had a global variable value less than the passed value when the ended. Only applies to already ended process instances, otherwise use aProcessInstanceQueryinstead! Booleans, Byte-arrays andSerializableobjects (which are not primitive type wrappers) are not supported.- Parameters:
name- cannot be null.value- cannot be null.
-
variableValueLessThanOrEqual
Only select process instances which has a global variable value less than or equal to the passed value when they ended. Only applies to already ended process instances, otherwise use aProcessInstanceQueryinstead! Booleans, Byte-arrays andSerializableobjects (which are not primitive type wrappers) are not supported.- Parameters:
name- cannot be null.value- cannot be null.
-
variableValueLike
Only select process instances which had global variable value like the given value when they ended. Only applies to already ended process instances, otherwise use aProcessInstanceQueryinstead! 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
Only select process instances which had global variable value like (case insensitive) the given value when they ended. Only applies to already ended process instances, otherwise use aProcessInstanceQueryinstead! 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%).
-
startedBefore
Only select historic process instances that were started before the given date. -
startedAfter
Only select historic process instances that were started after the given date. -
finishedBefore
Only select historic process instances that were started before the given date. -
finishedAfter
Only select historic process instances that were started after the given date. -
startedBy
Only select historic process instance that are started by the given user. -
processInstanceTenantId
Only select process instances that have the given tenant id. -
processInstanceTenantIdLike
Only select process instances with a tenant id like the given one. -
processInstanceWithoutTenantId
HistoricProcessInstanceQuery processInstanceWithoutTenantId()Only select process instances that do not have a tenant id. -
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
HistoricProcessInstanceQuery endOr()End an OR statement. Only one OR statement is allowed, for the second call to this method an exception will be thrown. -
orderByProcessInstanceId
HistoricProcessInstanceQuery orderByProcessInstanceId()Order by the process instance id (needs to be followed byQuery.asc()orQuery.desc()). -
orderByProcessDefinitionId
HistoricProcessInstanceQuery orderByProcessDefinitionId()Order by the process definition id (needs to be followed byQuery.asc()orQuery.desc()). -
orderByProcessInstanceBusinessKey
HistoricProcessInstanceQuery orderByProcessInstanceBusinessKey()Order by the business key (needs to be followed byQuery.asc()orQuery.desc()). -
orderByProcessInstanceStartTime
HistoricProcessInstanceQuery orderByProcessInstanceStartTime()Order by the start time (needs to be followed byQuery.asc()orQuery.desc()). -
orderByProcessInstanceEndTime
HistoricProcessInstanceQuery orderByProcessInstanceEndTime()Order by the end time (needs to be followed byQuery.asc()orQuery.desc()). -
orderByProcessInstanceDuration
HistoricProcessInstanceQuery orderByProcessInstanceDuration()Order by the duration of the process instance (needs to be followed byQuery.asc()orQuery.desc()). -
orderByTenantId
HistoricProcessInstanceQuery orderByTenantId()Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()). -
superProcessInstanceId
Only select historic process instances started by the given process instance. {@link ProcessInstance) ids and {@link HistoricProcessInstance} ids match. -
excludeSubprocesses
Exclude sub processes from the query result; -
includeProcessVariables
HistoricProcessInstanceQuery includeProcessVariables()Include process variables in the process query result -
limitProcessInstanceVariables
Limit process instance variables -
withJobException
HistoricProcessInstanceQuery withJobException()Only select process instances that failed due to an exception happening during a job execution. -
processInstanceName
Only select process instances with the given name. -
processInstanceNameLike
Only select process instances with a name like the given value. -
processInstanceNameLikeIgnoreCase
Only select process instances with a name like the given value, ignoring upper/lower case. -
locale
Localize historic process name and description to specified locale. -
withLocalizationFallback
HistoricProcessInstanceQuery withLocalizationFallback()Instruct localization to fallback to more general locales including the default locale of the JVM if the specified locale is not found. -
involvedGroupsIn
Only select the historic process instances with which the given groups are involved.
-