Interface HistoricProcessInstanceQuery
- All Superinterfaces:
- Query<HistoricProcessInstanceQuery,- HistoricProcessInstance> 
- All Known Implementing Classes:
- HistoricProcessInstanceQueryImpl
HistoricProcessInstances.- Author:
- Tom Baeyens, Joram Barrez, Falko Menge
- 
Method SummaryModifier and TypeMethodDescriptionactive()Only select historic process instances that are active.activeActivityIdIn(String... ids) Only select historic process instances that have active activities with given ids.activityIdIn(String... ids) Only select historic process instances with an active activity with one of the given ids.caseInstanceId(String caseInstanceId) Only select historic process instances which are associated with the given case instance id.Only select historic process instances that are completed.endOr()endOr() terminates an OR query on which an arbitrary amount of filter criteria were applied.executedActivityAfter(Date date) Only select historic process instances that executed an activity after the given date.executedActivityBefore(Date date) Only select historic process instances that executed an activity before the given date.executedActivityIdIn(String... ids) Only select historic process instances that executed activities with given ids.executedJobAfter(Date date) Only select historic process instances that executed an job after the given date.executedJobBefore(Date date) Only select historic process instances that executed an job before the given date.Only select historic process instances that are externallyTerminated.finishDateBy(Date date) Deprecated.finishDateOn(Date date) Deprecated.usestartedAfter(Date)andstartedBefore(Date)insteadfinished()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.incidentIdIn(String... incidentIds) Only select historic process instances that have incidents with given ids.incidentMessage(String incidentMessage) Only select historic process instances with the given incident message.incidentMessageLike(String incidentMessageLike) Only select historic process instances which had an incident message like the given value.incidentStatus(String status) Only select historic process instances with incident status either 'open' or 'resolved'.incidentType(String incidentType) Only selects process instances with the given incident type.Only select historic process instances that are internallyTerminated.The query will match the names of variables in a case-insensitive way.The query will match the values of variables in a case-insensitive way.or()After calling or(), a chain of several filter criteria could follow.Order by the process definition id (needs to be followed byQuery.asc()orQuery.desc()).Order by the process definition key (needs to be followed byQuery.asc()orQuery.desc()).Order by the process definition name (needs to be followed byQuery.asc()orQuery.desc()).Order by the process definition version (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()).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(String... processDefinitionKeys) Only select historic process instances that are defined by any given process definition key.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) Only select historic process instances that are defined by a process definition with the given name.processDefinitionNameLike(String nameLike) Only select historic process instances that are defined by process definition which name is like the given value.processInstanceBusinessKey(String processInstanceBusinessKey) Only select historic process instances with the given business keyprocessInstanceBusinessKeyIn(String... processInstanceBusinessKeyIn) Only select historic process instances whose business key is in the given set.processInstanceBusinessKeyLike(String processInstanceBusinessKeyLike) Only select historic process instances which had a business key like the given value.processInstanceId(String processInstanceId) Only select historic process instances with the given process instance.processInstanceIdNotIn(String... processInstanceIdNotIn) Only select historic process instances whose id is not in the given set of ids.processInstanceIds(Set<String> processInstanceIds) Only select historic process instances whose id is in the given set of ids.Only select historic process instances that are top level process instances.startDateBy(Date date) Deprecated.usestartedAfter(Date)andstartedBefore(Date)insteadstartDateOn(Date date) Deprecated.usestartedAfter(Date)andstartedBefore(Date)insteadstartedAfter(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.subCaseInstanceId(String subCaseInstanceId) Only select historic process instances having a sub case instance with the given case instance id.subProcessInstanceId(String subProcessInstanceId) Only select historic process instances having a sub process instance with the given process instance id.superCaseInstanceId(String superCaseInstanceId) Only select historic process instances started by the given case instance.superProcessInstanceId(String superProcessInstanceId) Only select historic process instances started by the given process instance.Only select historic process instances that are suspended.tenantIdIn(String... tenantIds) Only select historic process instances with one of the given tenant ids.Only select historic process instance that are not yet finished.variableValueEquals(String name, Object value) Only select process instances which had a global variable with the given value when they ended.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.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 historic process instances with incidentsOnly select historic process instances which are associated with jobs that have exceptions and retries left.Only selects historic process instances which have no tenant id.Only select historic process instances with root incidentsMethods inherited from interface org.camunda.bpm.engine.query.Queryasc, count, desc, list, listPage, singleResult, unlimitedList
- 
Method Details- 
processInstanceIdOnly select historic process instances with the given process instance. {@link ProcessInstance) ids and {@link HistoricProcessInstance} ids match.
- 
processInstanceIdsOnly select historic process instances whose id is in the given set of ids. {@link ProcessInstance) ids and {@link HistoricProcessInstance} ids match.
- 
processInstanceIdNotInOnly select historic process instances whose id is not in the given set of ids. {@link ProcessInstance) ids and {@link HistoricProcessInstance} ids match.
- 
processDefinitionIdOnly select historic process instances for the given process definition
- 
processDefinitionKeyOnly select historic process instances that are defined by a process definition with the given key.
- 
processDefinitionKeyInOnly select historic process instances that are defined by any given process definition key.
- 
processDefinitionKeyNotInOnly select historic process instances that don't have a process-definition of which the key is present in the given list
- 
processDefinitionNameOnly select historic process instances that are defined by a process definition with the given name.
- 
processDefinitionNameLikeOnly select historic process instances that are defined by process definition which name is like the given value.- Parameters:
- nameLike- The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).
 
- 
processInstanceBusinessKeyOnly select historic process instances with the given business key
- 
processInstanceBusinessKeyInOnly select historic process instances whose business key is in the given set.
- 
processInstanceBusinessKeyLikeOnly select historic process instances which had a business key like the given value.- Parameters:
- processInstanceBusinessKeyLike- The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).
 
- 
finishedHistoricProcessInstanceQuery finished()Only select historic process instances that are completely finished.
- 
unfinishedHistoricProcessInstanceQuery unfinished()Only select historic process instance that are not yet finished.
- 
withIncidentsHistoricProcessInstanceQuery withIncidents()Only select historic process instances with incidents- Returns:
- HistoricProcessInstanceQuery
 
- 
withRootIncidentsHistoricProcessInstanceQuery withRootIncidents()Only select historic process instances with root incidents- Returns:
- HistoricProcessInstanceQuery
 
- 
incidentIdInOnly select historic process instances that have incidents with given ids.
- 
incidentStatusOnly select historic process instances with incident status either 'open' or 'resolved'. To get all process instances with incidents, usewithIncidents().- Parameters:
- status- indicates the incident status, which is either 'open' or 'resolved'
- Returns:
- HistoricProcessInstanceQuery
 
- 
incidentTypeOnly selects process instances with the given incident type.
- 
incidentMessageOnly select historic process instances with the given incident message.- Parameters:
- incidentMessage- Incidents Message for which the historic process instances should be selected
- Returns:
- HistoricProcessInstanceQuery
 
- 
incidentMessageLikeOnly select historic process instances which had an incident message like the given value.- Parameters:
- incidentMessageLike- The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).
- Returns:
- HistoricProcessInstanceQuery
 
- 
withJobsRetryingHistoricProcessInstanceQuery withJobsRetrying()Only select historic process instances which are associated with jobs that have exceptions and retries left.- Returns:
- HistoricProcessInstanceQuery
 
- 
caseInstanceIdOnly select historic process instances which are associated with the given case instance id.
- 
matchVariableNamesIgnoreCaseHistoricProcessInstanceQuery matchVariableNamesIgnoreCase()The query will match the names of variables in a case-insensitive way.
- 
matchVariableValuesIgnoreCaseHistoricProcessInstanceQuery matchVariableValuesIgnoreCase()The query will match the values of variables in a case-insensitive way.
- 
variableValueEqualsOnly select process instances which had a global variable with the given value when they ended. Only select process instances which have a variable value greater than the passed value. The type only applies to already ended process instances, otherwise use aProcessInstanceQueryinstead! The type of the variable is determined based on the value, using types configured inProcessEngineConfigurationImpl.getVariableSerializers(). Byte-arrays andSerializableobjects (which are not primitive type wrappers) are not supported.- Parameters:
- name- of the variable, cannot be null.
 
- 
variableValueNotEqualsOnly 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.
 
- 
variableValueGreaterThanOnly 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.
 
- 
variableValueGreaterThanOrEqualOnly 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.
 
- 
variableValueLessThanOnly 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.
 
- 
variableValueLessThanOrEqualOnly 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.
 
- 
variableValueLikeOnly 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%).
 
- 
startedBeforeOnly select historic process instances that were started before the given date.
- 
startedAfterOnly select historic process instances that were started after the given date.
- 
finishedBeforeOnly select historic process instances that were started before the given date.
- 
finishedAfterOnly select historic process instances that were started after the given date.
- 
startedByOnly select historic process instance that are started by the given user.
- 
orderByProcessInstanceIdHistoricProcessInstanceQuery orderByProcessInstanceId()Order by the process instance id (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByProcessDefinitionIdHistoricProcessInstanceQuery orderByProcessDefinitionId()Order by the process definition id (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByProcessDefinitionKeyHistoricProcessInstanceQuery orderByProcessDefinitionKey()Order by the process definition key (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByProcessDefinitionNameHistoricProcessInstanceQuery orderByProcessDefinitionName()Order by the process definition name (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByProcessDefinitionVersionHistoricProcessInstanceQuery orderByProcessDefinitionVersion()Order by the process definition version (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByProcessInstanceBusinessKeyHistoricProcessInstanceQuery orderByProcessInstanceBusinessKey()Order by the business key (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByProcessInstanceStartTimeHistoricProcessInstanceQuery orderByProcessInstanceStartTime()Order by the start time (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByProcessInstanceEndTimeHistoricProcessInstanceQuery orderByProcessInstanceEndTime()Order by the end time (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByProcessInstanceDurationHistoricProcessInstanceQuery orderByProcessInstanceDuration()Order by the duration of the process instance (needs to be followed byQuery.asc()orQuery.desc()).
- 
rootProcessInstancesHistoricProcessInstanceQuery rootProcessInstances()Only select historic process instances that are top level process instances.
- 
superProcessInstanceIdOnly select historic process instances started by the given process instance. {@link ProcessInstance) ids and {@link HistoricProcessInstance} ids match.
- 
subProcessInstanceIdOnly select historic process instances having a sub process instance with the given process instance id.Note that there will always be maximum only one such process instance that can be the result of this query. 
- 
superCaseInstanceIdOnly select historic process instances started by the given case instance.
- 
subCaseInstanceIdOnly select historic process instances having a sub case instance with the given case instance id.Note that there will always be maximum only one such process instance that can be the result of this query. 
- 
tenantIdInOnly select historic process instances with one of the given tenant ids.
- 
withoutTenantIdHistoricProcessInstanceQuery withoutTenantId()Only selects historic process instances which have no tenant id.
- 
orderByTenantIdHistoricProcessInstanceQuery orderByTenantId()Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()). Note that the ordering of historic process instances without tenant id is database-specific.
- 
startDateByDeprecated.usestartedAfter(Date)andstartedBefore(Date)insteadOnly select historic process instances that were started as of the provided date. (Date will be adjusted to reflect midnight)
- 
startDateOnDeprecated.usestartedAfter(Date)andstartedBefore(Date)insteadOnly select historic process instances that were started on the provided date.
- 
finishDateByDeprecated.usestartedAfter(Date)andstartedBefore(Date)insteadOnly select historic process instances that were finished as of the provided date. (Date will be adjusted to reflect one second before midnight)
- 
finishDateOnDeprecated.usestartedAfter(Date)andstartedBefore(Date)insteadOnly select historic process instances that were finished on provided date.
- 
executedActivityAfterOnly select historic process instances that executed an activity after the given date.
- 
executedActivityBeforeOnly select historic process instances that executed an activity before the given date.
- 
executedActivityIdInOnly select historic process instances that executed activities with given ids.
- 
activeActivityIdInOnly select historic process instances that have active activities with given ids.
- 
activityIdInOnly select historic process instances with an active activity with one of the given ids. In contrast to the `activeActivityIdIn` filter, it can query for async and incident activities.
- 
executedJobAfterOnly select historic process instances that executed an job after the given date.
- 
executedJobBeforeOnly select historic process instances that executed an job before the given date.
- 
activeHistoricProcessInstanceQuery active()Only select historic process instances that are active.
- 
suspendedHistoricProcessInstanceQuery suspended()Only select historic process instances that are suspended.
- 
completedHistoricProcessInstanceQuery completed()Only select historic process instances that are completed.
- 
externallyTerminatedHistoricProcessInstanceQuery externallyTerminated()Only select historic process instances that are externallyTerminated.
- 
internallyTerminatedHistoricProcessInstanceQuery internallyTerminated()Only select historic process instances that are internallyTerminated.
- 
orAfter calling or(), a chain of several filter criteria could follow. Each filter criterion that follows or() will be linked together with an OR expression until the OR query is terminated. To terminate the OR query right after the last filter criterion was applied, endOr()must be invoked.- Returns:
- an object of the type HistoricProcessInstanceQueryon which an arbitrary amount of filter criteria could be applied. The several filter criteria will be linked together by an OR expression.
- Throws:
- ProcessEngineException- when or() has been invoked directly after or() or after or() and trailing filter criteria. To prevent throwing this exception,- endOr()must be invoked after a chain of filter criteria to mark the end of the OR query.
 
- 
endOrHistoricProcessInstanceQuery endOr()endOr() terminates an OR query on which an arbitrary amount of filter criteria were applied. To terminate the OR query which has been started by invoking or(), endOr() must be invoked. Filter criteria which are applied after calling endOr() are linked together by an AND expression.- Returns:
- an object of the type HistoricProcessInstanceQueryon which an arbitrary amount of filter criteria could be applied. The filter criteria will be linked together by an AND expression.
- Throws:
- ProcessEngineException- when endOr() has been invoked before- or()was invoked. To prevent throwing this exception,- or()must be invoked first.
 
 
- 
startedAfter(Date)andstartedBefore(Date)instead