Interface HistoricDetailQuery
- All Superinterfaces:
Query<HistoricDetailQuery,
HistoricDetail>
- All Known Implementing Classes:
HistoricDetailQueryImpl
HistoricDetail
s.- Author:
- Tom Baeyens
-
Method Summary
Modifier 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-relatedHistoricDetail
s, 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 selectHistoricFormField
s.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 events
in 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
.variableTypeIn
(String... variableTypes) Only select historic process variables which match one of the given variable types.Only selectHistoricVariableUpdate
s.Only selects historic details that have no tenant id.Methods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
Method Details
-
detailId
Only select the historic detail with the given id.- Parameters:
id
- the historic detail to select- Returns:
- the query builder
-
processInstanceId
Only select historic variable updates with the given process instance.ProcessInstance
ids andHistoricProcessInstance
ids match. -
caseInstanceId
Only select historic variable updates with the given case instance.CaseInstance
ids andHistoricCaseInstance
ids match. -
executionId
Only select historic variable updates with the given execution. Note thatExecution
ids are not stored in the history as first class citizen, only process instances are. -
caseExecutionId
Only select historic variable updates with the given case execution. Note thatCaseExecution
ids are not stored in the history as first class citizen, only case instances are. -
activityId
Deprecated.since 5.2, useactivityInstanceId(String)
insteadOnly select historic variable updates associated to the givenactivity instance
. -
activityInstanceId
Only select historic variable updates associated to the givenactivity instance
. -
taskId
Only select historic variable updates associated to the givenhistoric task instance
. -
variableInstanceId
Only select historic variable updates associated to the givenhistoric variable instance
. -
variableTypeIn
Only select historic process variables which match one of the given variable types. -
formProperties
Deprecated.Only selectHistoricFormProperty
s. -
formFields
HistoricDetailQuery formFields()Only selectHistoricFormField
s. -
variableUpdates
HistoricDetailQuery variableUpdates()Only selectHistoricVariableUpdate
s. -
disableBinaryFetching
HistoricDetailQuery 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
-
disableCustomObjectDeserialization
HistoricDetailQuery 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. -
excludeTaskDetails
HistoricDetailQuery excludeTaskDetails()Exclude all task-relatedHistoricDetail
s, 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. -
tenantIdIn
Only select historic details with one of the given tenant ids. -
withoutTenantId
HistoricDetailQuery withoutTenantId()Only selects historic details that have no tenant id. -
processInstanceIdIn
Only select historic details with the given process instance ids. -
userOperationId
Select historic details related with given userOperationId. -
occurredBefore
Only select historic details that have occurred before the given date (inclusive). -
occurredAfter
Only select historic details that have occurred after the given date (inclusive). -
initial
HistoricDetailQuery initial()Only select historic details that were set during the process start. -
orderByTenantId
HistoricDetailQuery 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. -
orderByProcessInstanceId
HistoricDetailQuery orderByProcessInstanceId() -
orderByVariableName
HistoricDetailQuery orderByVariableName() -
orderByFormPropertyId
HistoricDetailQuery orderByFormPropertyId() -
orderByVariableType
HistoricDetailQuery orderByVariableType() -
orderByVariableRevision
HistoricDetailQuery orderByVariableRevision() -
orderByTime
HistoricDetailQuery orderByTime() -
orderPartiallyByOccurrence
HistoricDetailQuery orderPartiallyByOccurrence()Sort the
historic detail events
in the order in which they occurred and needs to be followed byQuery.asc()
orQuery.desc()
.The set of all
historic variable update events
is a partially ordered set. Due to this facthistoric variable update events
for two differentvariable instances
are incomparable. So that it is not possible to sort thehistoric variable update events
for twovariable instances
in the order they occurred. Just for onevariable instance
the set ofhistoric variable update events
can be totally ordered by usingvariableInstanceId(String)
andorderPartiallyByOccurrence()
which will return a result set ordered by its occurrence.For example:
An execution variablemyVariable
will 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 event
can occur only once.- Since:
- 7.3
-
activityInstanceId(String)
instead