public interface HistoricDetailQuery extends Query<HistoricDetailQuery,HistoricDetail>
HistoricDetail
s.Modifier and Type | Method and Description |
---|---|
HistoricDetailQuery |
activityId(String activityId)
Deprecated.
since 5.2, use
activityInstanceId(String) instead |
HistoricDetailQuery |
activityInstanceId(String activityInstanceId)
Only select historic variable updates associated to the given
activity 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-related
HistoricDetail 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 select
HistoricFormField s. |
HistoricDetailQuery |
formProperties()
Deprecated.
|
HistoricDetailQuery |
orderByFormPropertyId() |
HistoricDetailQuery |
orderByProcessInstanceId() |
HistoricDetailQuery |
orderByTenantId()
Order by tenant id (needs to be followed by
Query.asc() or Query.desc() ). |
HistoricDetailQuery |
orderByTime() |
HistoricDetailQuery |
orderByVariableName() |
HistoricDetailQuery |
orderByVariableRevision() |
HistoricDetailQuery |
orderByVariableType() |
HistoricDetailQuery |
orderPartiallyByOccurrence()
Sort the
historic detail events in the order in which
they occurred and needs to be followed by Query.asc() or Query.desc() . |
HistoricDetailQuery |
processInstanceId(String processInstanceId)
Only select historic variable updates with the given process instance.
|
HistoricDetailQuery |
taskId(String taskId)
Only select historic variable updates associated to the given
historic task instance . |
HistoricDetailQuery |
tenantIdIn(String... tenantIds)
Only select historic details with one of the given tenant ids.
|
HistoricDetailQuery |
variableInstanceId(String variableInstanceId)
Only select historic variable updates associated to the given
historic variable instance . |
HistoricDetailQuery |
variableUpdates()
Only select
HistoricVariableUpdate s. |
HistoricDetailQuery detailId(String id)
id
- the historic detail to selectHistoricDetailQuery processInstanceId(String processInstanceId)
ProcessInstance
ids and HistoricProcessInstance
ids match.HistoricDetailQuery caseInstanceId(String caseInstanceId)
CaseInstance
ids and HistoricCaseInstance
ids match.HistoricDetailQuery executionId(String executionId)
Execution
ids are not stored in the history as first class citizen,
only process instances are.HistoricDetailQuery caseExecutionId(String caseExecutionId)
CaseExecution
ids are not stored in the history as first class citizen,
only case instances are.HistoricDetailQuery activityId(String activityId)
activityInstanceId(String)
insteadactivity instance
.HistoricDetailQuery activityInstanceId(String activityInstanceId)
activity instance
.HistoricDetailQuery taskId(String taskId)
historic task instance
.HistoricDetailQuery variableInstanceId(String variableInstanceId)
historic variable instance
.@Deprecated HistoricDetailQuery formProperties()
HistoricFormProperty
s.HistoricDetailQuery formFields()
HistoricFormField
s.HistoricDetailQuery variableUpdates()
HistoricVariableUpdate
s.HistoricDetailQuery disableBinaryFetching()
HistoricDetailQuery disableCustomObjectDeserialization()
HistoricDetailQuery excludeTaskDetails()
HistoricDetail
s, so only items which have no
task-id set will be selected. When used together with taskId(String)
, this
call is ignored task details are NOT excluded.HistoricDetailQuery tenantIdIn(String... tenantIds)
HistoricDetailQuery orderByTenantId()
Query.asc()
or Query.desc()
).
Note that the ordering of historic details without tenant id is database-specific.HistoricDetailQuery orderByProcessInstanceId()
HistoricDetailQuery orderByVariableName()
HistoricDetailQuery orderByFormPropertyId()
HistoricDetailQuery orderByVariableType()
HistoricDetailQuery orderByVariableRevision()
HistoricDetailQuery orderByTime()
HistoricDetailQuery orderPartiallyByOccurrence()
Sort the historic detail events
in the order in which
they occurred and needs to be followed by Query.asc()
or Query.desc()
.
The set of all historic variable update events
is
a partially ordered set. Due to this fact historic variable update events
for two different variable
instances
are incomparable. So that it is not possible to sort
the historic variable update events
for two variable instances
in the order they occurred. Just for one variable
instance
the set of historic variable update events
can be
totally ordered by using variableInstanceId(String)
and orderPartiallyByOccurrence()
which will return a result set ordered by its occurrence.
For example:
An execution variable myVariable
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)
and orderPartiallyByOccurrence()
it
is possible to sort the events in the order in which they occurred. The following query
historyService.createHistoricDetailQuery()
.variableInstanceId("myVariableInstId")
.orderBySequenceCounter()
.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 a historic form field event
can occur only once.
Copyright © 2018. All rights reserved.