Interface HistoricDetailQuery
-
- All Superinterfaces:
Query<HistoricDetailQuery,HistoricDetail>
- All Known Implementing Classes:
HistoricDetailQueryImpl
public interface HistoricDetailQuery extends Query<HistoricDetailQuery,HistoricDetail>
Programmatic querying forHistoricDetail
s.- Author:
- Tom Baeyens
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description HistoricDetailQuery
activityId(String activityId)
Deprecated.since 5.2, useactivityInstanceId(String)
insteadHistoricDetailQuery
activityInstanceId(String activityInstanceId)
Only select historic variable updates associated to the givenactivity instance
.HistoricDetailQuery
caseExecutionId(String caseExecutionId)
Only select historic variable updates with the given case execution.HistoricDetailQuery
caseInstanceId(String caseInstanceId)
Only select historic variable updates with the given case instance.HistoricDetailQuery
detailId(String id)
Only select the historic detail with the given id.HistoricDetailQuery
disableBinaryFetching()
Disable fetching of byte array and file values.HistoricDetailQuery
disableCustomObjectDeserialization()
Disable deserialization of variable values that are custom objects.HistoricDetailQuery
excludeTaskDetails()
Exclude all task-relatedHistoricDetail
s, so only items which have no task-id set will be selected.HistoricDetailQuery
executionId(String executionId)
Only select historic variable updates with the given execution.HistoricDetailQuery
formFields()
Only selectHistoricFormField
s.HistoricDetailQuery
formProperties()
Deprecated.HistoricDetailQuery
initial()
Only select historic details that were set during the process start.HistoricDetailQuery
occurredAfter(Date date)
Only select historic details that have occurred after the given date (inclusive).HistoricDetailQuery
occurredBefore(Date date)
Only select historic details that have occurred before the given date (inclusive).HistoricDetailQuery
orderByFormPropertyId()
HistoricDetailQuery
orderByProcessInstanceId()
HistoricDetailQuery
orderByTenantId()
Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricDetailQuery
orderByTime()
HistoricDetailQuery
orderByVariableName()
HistoricDetailQuery
orderByVariableRevision()
HistoricDetailQuery
orderByVariableType()
HistoricDetailQuery
orderPartiallyByOccurrence()
Sort thehistoric detail events
in the order in which they occurred and needs to be followed byQuery.asc()
orQuery.desc()
.HistoricDetailQuery
processInstanceId(String processInstanceId)
Only select historic variable updates with the given process instance.HistoricDetailQuery
processInstanceIdIn(String... processInstanceIds)
Only select historic details with the given process instance ids.HistoricDetailQuery
taskId(String taskId)
Only select historic variable updates associated to the givenhistoric task instance
.HistoricDetailQuery
tenantIdIn(String... tenantIds)
Only select historic details with one of the given tenant ids.HistoricDetailQuery
userOperationId(String userOperationId)
Select historic details related with given userOperationId.HistoricDetailQuery
variableInstanceId(String variableInstanceId)
Only select historic variable updates associated to the givenhistoric variable instance
.HistoricDetailQuery
variableTypeIn(String... variableTypes)
Only select historic process variables which match one of the given variable types.HistoricDetailQuery
variableUpdates()
Only selectHistoricVariableUpdate
s.HistoricDetailQuery
withoutTenantId()
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 Detail
-
detailId
HistoricDetailQuery detailId(String id)
Only select the historic detail with the given id.- Parameters:
id
- the historic detail to select- Returns:
- the query builder
-
processInstanceId
HistoricDetailQuery processInstanceId(String processInstanceId)
Only select historic variable updates with the given process instance.ProcessInstance
ids andHistoricProcessInstance
ids match.
-
caseInstanceId
HistoricDetailQuery caseInstanceId(String caseInstanceId)
Only select historic variable updates with the given case instance.CaseInstance
ids andHistoricCaseInstance
ids match.
-
executionId
HistoricDetailQuery executionId(String 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
HistoricDetailQuery caseExecutionId(String 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
HistoricDetailQuery activityId(String activityId)
Deprecated.since 5.2, useactivityInstanceId(String)
insteadOnly select historic variable updates associated to the givenactivity instance
.
-
activityInstanceId
HistoricDetailQuery activityInstanceId(String activityInstanceId)
Only select historic variable updates associated to the givenactivity instance
.
-
taskId
HistoricDetailQuery taskId(String taskId)
Only select historic variable updates associated to the givenhistoric task instance
.
-
variableInstanceId
HistoricDetailQuery variableInstanceId(String variableInstanceId)
Only select historic variable updates associated to the givenhistoric variable instance
.
-
variableTypeIn
HistoricDetailQuery variableTypeIn(String... variableTypes)
Only select historic process variables which match one of the given variable types.
-
formProperties
@Deprecated HistoricDetailQuery 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
HistoricDetailQuery tenantIdIn(String... tenantIds)
Only select historic details with one of the given tenant ids.
-
withoutTenantId
HistoricDetailQuery withoutTenantId()
Only selects historic details that have no tenant id.
-
processInstanceIdIn
HistoricDetailQuery processInstanceIdIn(String... processInstanceIds)
Only select historic details with the given process instance ids.
-
userOperationId
HistoricDetailQuery userOperationId(String userOperationId)
Select historic details related with given userOperationId.
-
occurredBefore
HistoricDetailQuery occurredBefore(Date date)
Only select historic details that have occurred before the given date (inclusive).
-
occurredAfter
HistoricDetailQuery occurredAfter(Date date)
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
-
-