Package org.flowable.engine.history

# Interface HistoricActivityInstanceQuery

All Superinterfaces:
  `DeleteQuery<HistoricActivityInstanceQuery,HistoricActivityInstance>`, `Query<HistoricActivityInstanceQuery,HistoricActivityInstance>`

public interface HistoricActivityInstanceQuery extends Query<HistoricActivityInstanceQuery,HistoricActivityInstance>, DeleteQuery<HistoricActivityInstanceQuery,HistoricActivityInstance>
Programmatic querying for `HistoricActivityInstance`s.

Author:
  Tom Baeyens, Joram Barrez, Zheng Ji

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.flowable.common.engine.api.query.Query

  `Query.NullHandlingOnOrder`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `HistoricActivityInstanceQuery`
  `activityId(String activityId)`
  Only select historic activity instances for the given activity (id from BPMN 2.0 XML)
  `HistoricActivityInstanceQuery`
  `activityInstanceId(String activityInstanceId)`
  Only select historic activity instances with the given id (primary key within history tables).
  `HistoricActivityInstanceQuery`
  `activityName(String activityName)`
  Only select historic activity instances for activities with the given name
  `HistoricActivityInstanceQuery`
  `activityTenantId(String tenantId)`
  Only select historic activity instances that have the given tenant id.
  `HistoricActivityInstanceQuery`
  `activityTenantIdLike(String tenantIdLike)`
  Only select historic activity instances with a tenant id like the given one.
  `HistoricActivityInstanceQuery`
  `activityType(String activityType)`
  Only select historic activity instances for activities with the given activity type
  `HistoricActivityInstanceQuery`
  `activityTypes(Set<String> activityTypes)`
  Only select historic activity instances whose activity type is in the given set of activity types.
  `HistoricActivityInstanceQuery`
  `activityWithoutTenantId()`
  Only select historic activity instances that do not have a tenant id.
  `HistoricActivityInstanceQuery`
  `deleteReason(String deleteReason)`
  Only select historic activity instances with a specific delete reason.
  `HistoricActivityInstanceQuery`
  `deleteReasonLike(String deleteReasonLike)`
  Only select historic activity instances with a delete reason that matches the provided parameter.
  `HistoricActivityInstanceQuery`
  `executionId(String executionId)`
  Only select historic activity instances for the given execution
  `HistoricActivityInstanceQuery`
  `finished()`
  Only select historic activity instances that are finished.
  `HistoricActivityInstanceQuery`
  `finishedAfter(Date date)`
  Only select historic activity instances that were started after the given date.
  `HistoricActivityInstanceQuery`
  `finishedBefore(Date date)`
  Only select historic activity instances that were started before the given date.
  `HistoricActivityInstanceQuery`
  `orderByActivityId()`
  Order by activityId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  `orderByActivityName()`
  Order by activityName (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  `orderByActivityType()`
  Order by activityType (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  `orderByExecutionId()`
  Order by executionId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  `orderByHistoricActivityInstanceDuration()`
  Order by duration (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  `orderByHistoricActivityInstanceEndTime()`
  Order by end (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  `orderByHistoricActivityInstanceId()`
  Order by id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  `orderByHistoricActivityInstanceStartTime()`
  Order by start (needs to be followed by `Query.asc()` or `Query.desc()` ).
  `HistoricActivityInstanceQuery`
  `orderByProcessDefinitionId()`
  Order by processDefinitionId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  `orderByProcessInstanceId()`
  Order by processInstanceId (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  `orderByTenantId()`
  Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `HistoricActivityInstanceQuery`
  `processDefinitionId(String processDefinitionId)`
  Only select historic activity instances for the given process definition
  `HistoricActivityInstanceQuery`
  `processInstanceId(String processInstanceId)`
  Only select historic activity instances with the given process instance.
  `HistoricActivityInstanceQuery`
  `startedAfter(Date date)`
  Only select historic activity instances that were started after the given date.
  `HistoricActivityInstanceQuery`
  `startedBefore(Date date)`
  Only select historic activity instances that were started before the given date.
  `HistoricActivityInstanceQuery`
  `taskAssignee(String userId)`
  Only select historic activity instances for userTask activities assigned to the given user
  `HistoricActivityInstanceQuery`
  `taskCompletedBy(String userId)`
  Only select historic activity instances for userTask activities completed by the given user
  `HistoricActivityInstanceQuery`
  `tenantIdIn(List<String> tenantIds)`
  Only select historic activity instances with one of the given tenant ids.
  `HistoricActivityInstanceQuery`
  `unfinished()`
  Only select historic activity instances that are not finished yet.

  ### Methods inherited from interface org.flowable.common.engine.api.query.DeleteQuery

  `delete, deleteWithRelatedData`

  ### Methods inherited from interface org.flowable.common.engine.api.query.Query

  `asc, count, desc, list, listPage, orderBy, orderBy, singleResult`

- ## Method Details

  - ### activityInstanceId

    HistoricActivityInstanceQuery activityInstanceId(String activityInstanceId)
    Only select historic activity instances with the given id (primary key within history tables).

  - ### processInstanceId

    HistoricActivityInstanceQuery processInstanceId(String processInstanceId)
    Only select historic activity instances with the given process instance. `ProcessInstance` ids and `HistoricProcessInstance` ids match.

  - ### processDefinitionId

    HistoricActivityInstanceQuery processDefinitionId(String processDefinitionId)
    Only select historic activity instances for the given process definition

  - ### executionId

    HistoricActivityInstanceQuery executionId(String executionId)
    Only select historic activity instances for the given execution

  - ### activityId

    HistoricActivityInstanceQuery activityId(String activityId)
    Only select historic activity instances for the given activity (id from BPMN 2.0 XML)

  - ### activityName

    HistoricActivityInstanceQuery activityName(String activityName)
    Only select historic activity instances for activities with the given name

  - ### activityType

    HistoricActivityInstanceQuery activityType(String activityType)
    Only select historic activity instances for activities with the given activity type

  - ### activityTypes

    HistoricActivityInstanceQuery activityTypes(Set<String> activityTypes)
    Only select historic activity instances whose activity type is in the given set of activity types.

  - ### taskAssignee

    HistoricActivityInstanceQuery taskAssignee(String userId)
    Only select historic activity instances for userTask activities assigned to the given user

  - ### taskCompletedBy

    HistoricActivityInstanceQuery taskCompletedBy(String userId)
    Only select historic activity instances for userTask activities completed by the given user

  - ### finished

    HistoricActivityInstanceQuery finished()
    Only select historic activity instances that are finished.

  - ### unfinished

    HistoricActivityInstanceQuery unfinished()
    Only select historic activity instances that are not finished yet.

  - ### startedBefore

    HistoricActivityInstanceQuery startedBefore(Date date)
    Only select historic activity instances that were started before the given date.

  - ### startedAfter

    HistoricActivityInstanceQuery startedAfter(Date date)
    Only select historic activity instances that were started after the given date.

  - ### finishedBefore

    HistoricActivityInstanceQuery finishedBefore(Date date)
    Only select historic activity instances that were started before the given date.

  - ### finishedAfter

    HistoricActivityInstanceQuery finishedAfter(Date date)
    Only select historic activity instances that were started after the given date.

  - ### deleteReason

    HistoricActivityInstanceQuery deleteReason(String deleteReason)
    Only select historic activity instances with a specific delete reason.

  - ### deleteReasonLike

    HistoricActivityInstanceQuery deleteReasonLike(String deleteReasonLike)
    Only select historic activity instances with a delete reason that matches the provided parameter.

  - ### activityTenantId

    HistoricActivityInstanceQuery activityTenantId(String tenantId)
    Only select historic activity instances that have the given tenant id.

  - ### tenantIdIn

    HistoricActivityInstanceQuery tenantIdIn(List<String> tenantIds)
    Only select historic activity instances with one of the given tenant ids.

  - ### activityTenantIdLike

    HistoricActivityInstanceQuery activityTenantIdLike(String tenantIdLike)
    Only select historic activity instances with a tenant id like the given one.

  - ### activityWithoutTenantId

    HistoricActivityInstanceQuery activityWithoutTenantId()
    Only select historic activity instances that do not have a tenant id.

  - ### orderByHistoricActivityInstanceId

    HistoricActivityInstanceQuery orderByHistoricActivityInstanceId()
    Order by id (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessInstanceId

    HistoricActivityInstanceQuery orderByProcessInstanceId()
    Order by processInstanceId (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByExecutionId

    HistoricActivityInstanceQuery orderByExecutionId()
    Order by executionId (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByActivityId

    HistoricActivityInstanceQuery orderByActivityId()
    Order by activityId (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByActivityName

    HistoricActivityInstanceQuery orderByActivityName()
    Order by activityName (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByActivityType

    HistoricActivityInstanceQuery orderByActivityType()
    Order by activityType (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByHistoricActivityInstanceStartTime

    HistoricActivityInstanceQuery orderByHistoricActivityInstanceStartTime()
    Order by start (needs to be followed by `Query.asc()` or `Query.desc()` ).

  - ### orderByHistoricActivityInstanceEndTime

    HistoricActivityInstanceQuery orderByHistoricActivityInstanceEndTime()
    Order by end (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByHistoricActivityInstanceDuration

    HistoricActivityInstanceQuery orderByHistoricActivityInstanceDuration()
    Order by duration (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessDefinitionId

    HistoricActivityInstanceQuery orderByProcessDefinitionId()
    Order by processDefinitionId (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByTenantId

    HistoricActivityInstanceQuery orderByTenantId()
    Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).