Interface HistoricDetailQuery
- All Superinterfaces:
- Query<HistoricDetailQuery,- HistoricDetail> 
- All Known Implementing Classes:
- HistoricDetailQueryImpl
HistoricDetails.- Author:
- Tom Baeyens
- 
Method SummaryModifier and TypeMethodDescriptionactivityId(String activityId) Deprecated.activityInstanceId(String activityInstanceId) Only select historic variable updates associated to the givenactivity instance.caseExecutionId(String caseExecutionId) Only select historic variable updates with the given case execution.caseInstanceId(String caseInstanceId) Only select historic variable updates with the given case instance.Only select the historic detail with the given id.Disable fetching of byte array and file values.Disable deserialization of variable values that are custom objects.Exclude all task-relatedHistoricDetails, so only items which have no task-id set will be selected.executionId(String executionId) Only select historic variable updates with the given execution.Only selectHistoricFormFields.Deprecated.initial()Only select historic details that were set during the process start.occurredAfter(Date date) Only select historic details that have occurred after the given date (inclusive).occurredBefore(Date date) Only select historic details that have occurred before the given date (inclusive).Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).Sort thehistoric detail eventsin the order in which they occurred and needs to be followed byQuery.asc()orQuery.desc().processInstanceId(String processInstanceId) Only select historic variable updates with the given process instance.processInstanceIdIn(String... processInstanceIds) Only select historic details with the given process instance ids.Only select historic variable updates associated to the givenhistoric task instance.tenantIdIn(String... tenantIds) Only select historic details with one of the given tenant ids.userOperationId(String userOperationId) Select historic details related with given userOperationId.variableInstanceId(String variableInstanceId) Only select historic variable updates associated to the givenhistoric variable instance.variableNameLike(String variableNameLike) Only select historic process variables that have a name matching the criteria.variableTypeIn(String... variableTypes) Only select historic process variables which match one of the given variable types.Only selectHistoricVariableUpdates.Only selects historic details that have no tenant id.Methods inherited from interface org.camunda.bpm.engine.query.Queryasc, count, desc, list, listPage, singleResult, unlimitedList
- 
Method Details- 
detailIdOnly select the historic detail with the given id.- Parameters:
- id- the historic detail to select
- Returns:
- the query builder
 
- 
processInstanceIdOnly select historic variable updates with the given process instance.ProcessInstanceids andHistoricProcessInstanceids match.
- 
caseInstanceIdOnly select historic variable updates with the given case instance.CaseInstanceids andHistoricCaseInstanceids match.
- 
executionIdOnly select historic variable updates with the given execution. Note thatExecutionids are not stored in the history as first class citizen, only process instances are.
- 
caseExecutionIdOnly select historic variable updates with the given case execution. Note thatCaseExecutionids are not stored in the history as first class citizen, only case instances are.
- 
activityIdDeprecated.since 5.2, useactivityInstanceId(String)insteadOnly select historic variable updates associated to the givenactivity instance.
- 
activityInstanceIdOnly select historic variable updates associated to the givenactivity instance.
- 
taskIdOnly select historic variable updates associated to the givenhistoric task instance.
- 
variableInstanceIdOnly select historic variable updates associated to the givenhistoric variable instance.
- 
variableTypeInOnly select historic process variables which match one of the given variable types.
- 
variableNameLikeOnly select historic process variables that have a name matching the criteria. The syntax is that of SQL: for example usage: variableNameLike(%camunda%). The query will match the names of variables in a case-insensitive way.
- 
formPropertiesDeprecated.Only selectHistoricFormPropertys.
- 
formFieldsHistoricDetailQuery formFields()Only selectHistoricFormFields.
- 
variableUpdatesHistoricDetailQuery variableUpdates()Only selectHistoricVariableUpdates.
- 
disableBinaryFetchingHistoricDetailQuery disableBinaryFetching()Disable fetching of byte array and file values. By default, the query will fetch such values. By calling this method you can prevent the values of (potentially large) blob data chunks to be fetched. The variables themselves are nonetheless included in the query result.- Returns:
- the query builder
 
- 
disableCustomObjectDeserializationHistoricDetailQuery disableCustomObjectDeserialization()Disable deserialization of variable values that are custom objects. By default, the query will attempt to deserialize the value of these variables. By calling this method you can prevent such attempts in environments where their classes are not available. Independent of this setting, variable serialized values are accessible.
- 
excludeTaskDetailsHistoricDetailQuery excludeTaskDetails()Exclude all task-relatedHistoricDetails, so only items which have no task-id set will be selected. When used together withtaskId(String), this call is ignored task details are NOT excluded.
- 
tenantIdInOnly select historic details with one of the given tenant ids.
- 
withoutTenantIdHistoricDetailQuery withoutTenantId()Only selects historic details that have no tenant id.
- 
processInstanceIdInOnly select historic details with the given process instance ids.
- 
userOperationIdSelect historic details related with given userOperationId.
- 
occurredBeforeOnly select historic details that have occurred before the given date (inclusive).
- 
occurredAfterOnly select historic details that have occurred after the given date (inclusive).
- 
initialHistoricDetailQuery initial()Only select historic details that were set during the process start.
- 
orderByTenantIdHistoricDetailQuery orderByTenantId()Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()). Note that the ordering of historic details without tenant id is database-specific.
- 
orderByProcessInstanceIdHistoricDetailQuery orderByProcessInstanceId()
- 
orderByVariableNameHistoricDetailQuery orderByVariableName()
- 
orderByFormPropertyIdHistoricDetailQuery orderByFormPropertyId()
- 
orderByVariableTypeHistoricDetailQuery orderByVariableType()
- 
orderByVariableRevisionHistoricDetailQuery orderByVariableRevision()
- 
orderByTimeHistoricDetailQuery orderByTime()
- 
orderPartiallyByOccurrenceHistoricDetailQuery orderPartiallyByOccurrence()Sort the historic detail eventsin the order in which they occurred and needs to be followed byQuery.asc()orQuery.desc().The set of all historic variable update eventsis a partially ordered set. Due to this facthistoric variable update eventsfor two differentvariable instancesare incomparable. So that it is not possible to sort thehistoric variable update eventsfor twovariable instancesin the order they occurred. Just for onevariable instancethe set ofhistoric variable update eventscan be totally ordered by usingvariableInstanceId(String)andorderPartiallyByOccurrence()which will return a result set ordered by its occurrence.For example: 
 An execution variablemyVariablewill be updated multiple times:runtimeService.setVariable("anExecutionId", "myVariable", 1000);
 execution.setVariable("myVariable", 5000);
 runtimeService.setVariable("anExecutionId", "myVariable", 2500);
 runtimeService.removeVariable("anExecutionId", "myVariable");As a result there exists four historic variable update events.By using variableInstanceId(String)andorderPartiallyByOccurrence()it is possible to sort the events in the order in which they occurred. The following queryhistoryService.createHistoricDetailQuery()
 .variableInstanceId("myVariableInstId")
 .orderPartiallyByOccurrence()
 .asc()
 .list()will return the following totally ordered result set [
 HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: 1000],
 HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: 5000],
 HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: 2500]
 HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: null]
 ]Note: 
 Please note that ahistoric form field eventcan occur only once.- Since:
- 7.3
 
 
- 
activityInstanceId(String)instead